Init iterates over all objects
.
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)
Inititerates over all objectsfrostfs-node/pkg/local_object_storage/writecache/writecache.go
Line 147 in 89a0266
We should launch it in a goroutine:
ErrInitializing(or sth similar) on modifying operations until this goroutine finishes.Close()is called.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)