Make initialization great again #826

Closed
opened 2023-11-23 13:43:03 +00:00 by fyrchik · 0 comments
Owner

After #703 with the increase in the amount of databases, initialization times went up.
During initialization we create empty databases with similar structure, so here is an idea:

  1. Create a "template" empty database
  2. Copy it everywhere we need it. The size of initial DB is not too high so it can be stored in memory.

Problems to consider:

  1. Interrupted initialization can now lead to a half-written db being there, it could not open. Probably can be solved with atomic rename.

Another idea to test is delayed initialization/on-demand creation, but it seems to introduce more changes and concurrent interactions in code.

After #703 with the increase in the amount of databases, initialization times went up. During initialization we create empty databases with similar structure, so here is an idea: 1. Create a "template" empty database 2. Copy it everywhere we need it. The size of initial DB is not too high so it can be stored in memory. Problems to consider: 1. Interrupted initialization can now lead to a half-written db being there, it could not open. Probably can be solved with atomic `rename`. Another idea to test is delayed initialization/on-demand creation, but it seems to introduce more changes and concurrent interactions in code.
fyrchik added the
discussion
frostfs-node
triage
labels 2023-11-23 13:43:03 +00:00
dstepanov-yadro self-assigned this 2023-11-30 11:58:44 +00:00
fyrchik added this to the v0.38.0 milestone 2023-12-22 07:27:22 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#826
No description provided.