mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 10:37:23 +01:00
test(storage): witness unread candidates after hot-first ordering
This commit is contained in:
1 parent
782505510a
commit
2f6cf84c04
1 file changed
+4
@@ -370,6 +370,10 @@ func TestCutCOWV3_SaverBurstWaitsAndPublishes(t *testing.T) {
|
||||
if _, err := s.Write(9, makeBlock(ctBlockSize, 9)); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// Keep chunk 0 hottest, so the held copier precedes both unread saves.
|
||||
if _, err := s.Write(1, makeBlock(ctBlockSize, 1)); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
entered, release, waiting := make(chan struct{}), make(chan struct{}), make(chan struct{})
|
||||
var once, unblock sync.Once
|
||||
free := func() { unblock.Do(func() { close(release) }) }
|
||||
|
||||
Reference in new issue
Block a user