[#1462] writecache: Fill flush marks during startup

Some of the objects are already flushed, don't do it twice.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-06-01 10:06:32 +03:00 committed by LeL
parent f2a7503964
commit 6ad87e7959
2 changed files with 77 additions and 0 deletions

View file

@ -133,6 +133,8 @@ func (c *cache) Open() error {
// Init runs necessary services.
func (c *cache) Init() error {
c.initFlushMarks()
go c.persistLoop()
go c.flushLoop()
return nil