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

Feature: support merging checkpoints that were received out of sync #103

Open
mhutchinson opened this issue Feb 22, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@mhutchinson
Copy link
Contributor

This is easiest to explain with an example timeline with two witnesses, A & B:

  1. A sends checkpoint of size X
  2. B sends checkpoint of size X
  3. A sends checkpoint of size X+1
  4. A sends checkpoint of size X+2
  5. B sends checkpoint of size X+1

Asking for checkpoint with N=2 will give a checkpoint of size X, where a checkpoint of size X+1 should be possible.

The reason for this is that the distributor is optimized to only keep the latest checkpoint seen for each witness+log pair in the pool of checkpoints available for merging. If this is replaced before it is merged and promoted then it is lost forever.

There are a number of ways to go about fixing this, but they all risk making the size of the database unbounded in size, or increasing complexity. The current strategy is to wait to see if this appears to be a problem before taking on that risk/complexity.

This test case is covered in cmd/internal/distributor/distributor_test.go: TODO: N=2 can get historic version where both have been seen but not at same time

@mhutchinson mhutchinson added the enhancement New feature or request label Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant