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

Calculate merged checkpoints on write, not read #51

Merged
merged 2 commits into from
Nov 2, 2023

Conversation

mhutchinson
Copy link
Contributor

@mhutchinson mhutchinson commented Nov 2, 2023

This makes the read path much cheaper, and fixes an issue (demonstrated in the tests) that previously seen checkpoint.N could previously go missing. One functional change is that asking for checkpoint.N will now return precisely N signatures instead of at least N signatures.

The DB deployment is made a fraction more complicated by the introduction of another table, but its worthwhile doing this now while we have no production distributors.

@mhutchinson mhutchinson requested a review from AlCutter November 2, 2023 14:25
cmd/internal/distributor/distributor.go Outdated Show resolved Hide resolved
cmd/internal/distributor/distributor.go Outdated Show resolved Hide resolved
cmd/internal/distributor/distributor.go Outdated Show resolved Hide resolved
This makes the read path much cheaper, and fixes an issue (demonstrated in the tests) that previously seen checkpoint.N could previously go missing.
One functional change is that asking for checkpoint.N will now return precisely N signatures instead of at least N signatures.

The DB deployment is made a fraction more complicated by the introduction of another table, but its worthwhile doing this now while we have no production distributors.
@mhutchinson mhutchinson changed the title rememberN Calculate merged checkpoints on write, not read Nov 2, 2023
@mhutchinson mhutchinson merged commit 4d716ea into transparency-dev:main Nov 2, 2023
3 checks passed
@mhutchinson mhutchinson deleted the rememberN branch November 2, 2023 17:39
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.

2 participants