mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 11:07:31 +01:00
test(storage): settle retained wrap pressure before the next append
This commit is contained in:
1 parent
7918d50cfb
commit
598cf267e2
1 file changed
+9
@@ -833,6 +833,15 @@ func TestNativeReplacementRetainedBatchAcrossWrap(t *testing.T) {
|
||||
t.Fatalf("suffix %d: %+v", i, e)
|
||||
}
|
||||
}
|
||||
// The retained batch plus wrap padding occupies the hard watermark.
|
||||
// This fixture disables automatic flushing, so settle its remainder
|
||||
// explicitly before admitting the next guest write.
|
||||
if err := r.flusher.flushOnce(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if r.CheckpointLSN() != 17 {
|
||||
t.Fatalf("settled batch checkpoint=%d", r.CheckpointLSN())
|
||||
}
|
||||
if n, err := r.Write(20, blk(0xF1)); err != nil || n != 18 {
|
||||
t.Fatalf("post-recovery append=%d %v", n, err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user