forked from nspcc-dev/neofs-node
-
Notifications
You must be signed in to change notification settings - Fork 6
Initialize write-cache asynchronously #32
Copy link
Copy link
Open
Labels
Description
Init iterates over all objects
| c.initFlushMarks() |
We should launch it in a goroutine:
- Writecache should return
ErrInitializing(or sth similar) on modifying operations until this goroutine finishes. - The goroutine should finish prematurely if
Close()is called. - Don't forget about possible interference with
SetMode.
Testing
start/restart a service with a completely filled write caches -- shouldn't take more than 1-2 minutes (ideally <10 sec is expected)