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
settings: don't validate settings updates from gossip #44903
base: master
Are you sure you want to change the base?
Conversation
I left the |
a4df0a5
to
7bda0f1
Compare
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 @giorgosp! And sorry about the large turnaround, things have been quite busy on my end.
I left the StateMachineSetting methods intact since the ValidateGossipUpdate wants to crash if the cluster version setting couldn't be updated. Do we want to remove this validation too?
ValidateGossipUpdate
never returns an error (it fatals internally), so you can remove the error
return of it and rename set
to override
to match everything else. Does that sound good?
Reviewed 11 of 11 files at r1.
Reviewable status: complete! 0 of 0 LGTMs obtained
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.
Hi Tobias no problem, thanks for checking this out! Please check my comment on the issue (sorry for cross commenting in the PR and the issue).
Seems like we also need to make the settings table read-only and then remove all these validations in the updater.
Because now there are tests testing that a wrong (manual or not) insert in the system.settings table is not propagated to the other nodes.
Reviewable status: complete! 0 of 0 LGTMs obtained
Thanks, I just caught up on #44289 (comment). I think making the system.settings table read-only is out of scope here (just because it takes us too far out in the weeds), though if someone from SQL is interested maybe they can guide you (@asubiotto?). We can either
@dt do you have a preference? |
Eh, I suppose they could be read-only, but directly writing to system tables is already a "void your warranty" situation -- there are (safety-checked, validated, etc) setter methods like |
@giorgosp sorry for not closing the loop here - I think this PR is basically good to go! I will get this merged for you when we're in the next release cycle (we're in the stability period now, and I don't think this is worth risking). If you're up for more work in the meantime, I'll easily find something, let me know! |
Fixes cockroachdb#44289 Release note: None
7bda0f1
to
57d0336
Compare
No problem! When you have more time to check this PR, we may need to consider scraping it and just change preserveDowngradeVersion.Validate as you suggested, because now a lot of assertuibs are deleted to make tests pass.
Yes please! |
Fixes #44289