Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSR: Perform checkpoint steps concurrently #1509

Merged
merged 2 commits into from
Feb 5, 2024

Conversation

sentientwaffle
Copy link
Member

Instead of performing the checkpoint steps sequentially, perform them concurrently:

  • checkpoint_state_machine
  • checkpoint_client_replies
  • checkpoint_client_sessions

This PR doesn't make checkpoint_grid concurrent -- that will be in a follow-up PR since it is slightly more involved.

`checkpoint_state_machine`'s job is to flush manifest log blocks to the grid. It doesn't ever read blocks, so it can never get stuck waiting for grid repair. Thus, no need to cancel the grid, we can just wait for it to finish naturally.
Instead of performing the checkpoint steps sequentially, perform them concurrently:

- `checkpoint_state_machine`
- `checkpoint_client_replies`
- `checkpoint_client_sessions`

Notes:

- `forest.zig`: There may (now) be non-repair grid-writes while we are flushing the manifest log blocks – we are concurrently flushing the trailers at the same time.
@@ -438,7 +438,6 @@ pub fn ForestType(comptime _Storage: type, comptime groove_cfg: anytype) type {
const forest = @fieldParentPtr(Forest, "manifest_log", manifest_log);
assert(forest.progress.? == .checkpoint);
assert(forest.manifest_log_progress == .idle);
forest.grid.assert_only_repairing();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There may (now) be non-repair grid-writes while we are flushing the manifest log blocks – we are concurrently flushing the trailers at the same time.

@sentientwaffle sentientwaffle marked this pull request as ready for review February 2, 2024 16:04
@sentientwaffle sentientwaffle added this pull request to the merge queue Feb 5, 2024
Merged via the queue into main with commit 7b5b706 Feb 5, 2024
25 checks passed
@sentientwaffle sentientwaffle deleted the dj-vsr-checkpoint-concurrent-stages branch February 5, 2024 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants