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

Remove generation iteration after writing checkpoint. #69

Merged
merged 2 commits into from
Jan 8, 2024
Merged

Remove generation iteration after writing checkpoint. #69

merged 2 commits into from
Jan 8, 2024

Conversation

jiggoha
Copy link
Contributor

@jiggoha jiggoha commented Jan 4, 2024

Generation numbers are only monotonically increasing and not necessarily [0, 1, 2, ...] (FYI: metageneration numbers are): example here.

Remove code assuming the generation number of the new version after writing a checkpoint. Practically speaking, if there is no race condition, a client's knowledge about the checkpoint generation will match the truth in GCS, since the client always calls ReadCheckpoint before WriteCheckpoint. If there is a race condition, then a client's knowledge about the checkpoint generation will be out of date, and the write will fail because the precondition of the generation number will not match.

@jiggoha jiggoha requested a review from AlCutter January 4, 2024 20:39
@jiggoha jiggoha marked this pull request as ready for review January 4, 2024 20:39
@jiggoha jiggoha requested a review from mhutchinson January 5, 2024 15:40
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e3c71e7) 55.99% compared to head (d6ef740) 55.99%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #69   +/-   ##
=======================================
  Coverage   55.99%   55.99%           
=======================================
  Files           8        8           
  Lines         759      759           
=======================================
  Hits          425      425           
  Misses        265      265           
  Partials       69       69           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jiggoha jiggoha merged commit a78734d into main Jan 8, 2024
15 checks passed
@jiggoha jiggoha deleted the gen branch January 8, 2024 11:44
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.

3 participants