Initialize write-cache asynchronously #32

Closed
opened 2023-01-27 07:28:12 +00:00 by fyrchik · 1 comment
fyrchik commented 2023-01-27 07:28:12 +00:00 (Migrated from github.com)

Init iterates over all objects 89a0266f5e/pkg/local_object_storage/writecache/writecache.go (L147) .
We should launch it in a goroutine:

  1. Writecache should return ErrInitializing (or sth similar) on modifying operations until this goroutine finishes.
  2. The goroutine should finish prematurely if Close() is called.
  3. 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)

`Init` iterates over _all_ objects https://github.com/TrueCloudLab/frostfs-node/blob/89a0266f5eaf6184b45e41e6c684e78605697f1c/pkg/local_object_storage/writecache/writecache.go#L147 . We should launch it in a goroutine: 1. Writecache should return `ErrInitializing` (or sth similar) on modifying operations until this goroutine finishes. 2. The goroutine should finish prematurely if `Close()` is called. 3. 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)
fyrchik added a new dependency 2023-03-06 19:19:51 +00:00
fyrchik added reference carpawell/faster-wc-init 2023-03-06 19:21:00 +00:00
fyrchik removed a dependency 2023-03-06 19:21:14 +00:00
carpawell was assigned by fyrchik 2023-03-06 19:21:26 +00:00
carpawell removed reference carpawell/faster-wc-init 2023-03-10 14:07:16 +00:00
Contributor

Closed in #35.

Closed in #35.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#32
No description provided.