[#1284] writecache: Allow to seal writecache async

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2024-07-31 16:30:07 +03:00
parent 68029d756e
commit 93d63e1632
10 changed files with 252 additions and 170 deletions

View file

@ -37,8 +37,9 @@ type Shard struct {
rb *rebuilder
gcCancel atomic.Value
setModeRequested atomic.Bool
gcCancel atomic.Value
setModeRequested atomic.Bool
writecacheSealCancel atomic.Pointer[writecacheSealCanceler]
}
// Option represents Shard's constructor option.
@ -190,6 +191,7 @@ func New(opts ...Option) *Shard {
}
s.fillInfo()
s.writecacheSealCancel.Store(notInitializedCancel)
return s
}