Skip to content

Commit

Permalink
Merge pull request #1508 from tigerbeetle/dj-vsr-prepare-beyond-check…
Browse files Browse the repository at this point in the history
…point

VSR: Prepare beyond checkpoint
  • Loading branch information
sentientwaffle committed Feb 2, 2024
2 parents 09634c7 + 5ce4928 commit 7f92126
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 91 deletions.
1 change: 1 addition & 0 deletions src/constants.zig
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ comptime {
// from the previous WAL wrap until a quorum of replicas has reached that checkpoint.
assert(vsr_checkpoint_interval + lsm_batch_multiple + pipeline_prepare_queue_max <=
journal_slot_count);
assert(vsr_checkpoint_interval >= pipeline_prepare_queue_max);
assert(vsr_checkpoint_interval >= lsm_batch_multiple);
assert(vsr_checkpoint_interval % lsm_batch_multiple == 0);
}
Expand Down
2 changes: 1 addition & 1 deletion src/vsr.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,7 @@ pub const Checkpoint = struct {
}
}

pub fn border_for_checkpoint(checkpoint: u64) ?u64 {
pub fn prepare_max_for_checkpoint(checkpoint: u64) ?u64 {
assert(valid(checkpoint));

if (trigger_for_checkpoint(checkpoint)) |trigger| {
Expand Down
Loading

0 comments on commit 7f92126

Please sign in to comment.