-
Notifications
You must be signed in to change notification settings - Fork 29
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
Replace record checkpoint field with registry log index #171
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This allows tests to avoid an initialization race with the server.
lann
force-pushed
the
record-checkpoint-to-registry-index
branch
from
July 21, 2023 21:00
75a702a
to
73da454
Compare
lann
changed the title
Record checkpoint to registry index
Replace record checkpoint field with registry log index
Jul 21, 2023
lann
force-pushed
the
record-checkpoint-to-registry-index
branch
from
July 21, 2023 21:08
73da454
to
4de55aa
Compare
lann
commented
Jul 21, 2023
crates/server/src/datastore/postgres/migrations/2023-04-11-013700_initial_db/up.sql
Show resolved
Hide resolved
lann
commented
Jul 21, 2023
lann
commented
Jul 21, 2023
lann
commented
Jul 21, 2023
lann
force-pushed
the
record-checkpoint-to-registry-index
branch
from
July 21, 2023 21:23
4de55aa
to
08e9d29
Compare
peterhuene
approved these changes
Jul 23, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really great work! This both simplified things a bit and eliminated that restart checkpoint bug I mentioned earlier.
Just a few nit comments.
crates/server/src/datastore/postgres/migrations/2023-04-11-013700_initial_db/up.sql
Show resolved
Hide resolved
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prior to this commit, every published record is associated with the first checkpoint created after the record was added to the registry log. While this does aid clients in verifying the inclusion of a record, it is more information than necessary and forces the registry to hold on to all checkpoints indefinitely. It also requires additional bookkeeping just to track this partially-unnecessary information.
This removes that per-record checkpoint and instead associates each record with its index in the registry log. This is still enough information to aid inclusion proofs and reduces the overall complexity of the server.