-
Notifications
You must be signed in to change notification settings - Fork 360
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
GC: Read commit explicitly when it is missing from prescanned commits #8282
Conversation
The issue describes why this is a good idea. Fixes #8261.
Will pull if EITHER reviewer approves, unless you approve but ask me not to pull. THANKS! |
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.
Great find! THANKS!
LVGTM!
One suggestion to monitor the occurrences of the described race.
type CommitsMap struct { | ||
ctx context.Context | ||
Log logging.Logger | ||
NumMisses int64 |
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.
What about logging this?
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.
Done!
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.
Thanks!
type CommitsMap struct { | ||
ctx context.Context | ||
Log logging.Logger | ||
NumMisses int64 |
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.
Done!
Observing as a log for now, not a metric, as it is unclear what an interesting aggregation would be. OTOH logs are good to understand how this behaves.
GC lists all commits, but it can still miss a concurrent commit. When that happens, read it directly from KV.
The issue goes into detail why this is a good idea.
Fixes #8261.