-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
server/settingswatcher: track timestamps so values do not regress #87564
server/settingswatcher: track timestamps so values do not regress #87564
Conversation
Ignore the failed tests, this is RFAL |
s.mu.Lock() | ||
defer s.mu.Unlock() | ||
if existing, ok := s.mu.values[name]; ok && sv.ts.Less(existing.ts) { | ||
return |
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.
nit: a comment here (or on the func) as to why it'd be out of order might be nice; I'd ague I'd have expected it here more than on the struct.
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.
Reviewed 2 of 3 files at r1, all commit messages.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner, @dt, and @HonoreDB)
9583140
to
8769b3b
Compare
bors r+ |
Build failed (retrying...): |
Build failed (retrying...): |
Build failed: |
A rangefeed is allowed to send previously seen values. When it did, it would result in the observed value of a setting regressing. There's no need for this: we can track some timestamps and ensure we do not regress. Fixes cockroachdb#87502 Relates to cockroachdb#87201 Release note (bug fix): In rare cases, the value of a cluster setting could regress soon after it was set. This no longer happens for a given gateway node.
8769b3b
to
ffea578
Compare
bors r+ |
Build failed (retrying...): |
Build succeeded: |
This turns out to matter for testing. blathers backport 22.2 |
A rangefeed is allowed to send previously seen values. When it did, it would result in the observed value of a setting regressing. There's no need for this: we can track some timestamps and ensure we do not regress.
Fixes #87502
Relates to #87201
Release note (bug fix): In rare cases, the value of a cluster setting could regress soon after it was set. This no longer happens for a given gateway node.