-
Notifications
You must be signed in to change notification settings - Fork 4.1k
server: storeCachedSettingsKVs does not remove unset settings values #70567
Copy link
Copy link
Closed
Labels
A-configurabilityPertains to cluster settings, CLI flags, env vars etcPertains to cluster settings, CLI flags, env vars etcC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-multitenantIssues owned by the multi-tenant virtual teamIssues owned by the multi-tenant virtual teambranch-masterFailures and bugs on the master branch.Failures and bugs on the master branch.branch-release-23.2Used to mark GA and release blockers, technical advisories, and bugs for 23.2Used to mark GA and release blockers, technical advisories, and bugs for 23.2release-blockerIndicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked.Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked.
Metadata
Metadata
Assignees
Labels
A-configurabilityPertains to cluster settings, CLI flags, env vars etcPertains to cluster settings, CLI flags, env vars etcC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-multitenantIssues owned by the multi-tenant virtual teamIssues owned by the multi-tenant virtual teambranch-masterFailures and bugs on the master branch.Failures and bugs on the master branch.branch-release-23.2Used to mark GA and release blockers, technical advisories, and bugs for 23.2Used to mark GA and release blockers, technical advisories, and bugs for 23.2release-blockerIndicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked.Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked.
Is your feature request related to a problem? Please describe.
In
settingsworker.gowe store on disk in the system tenant a cache of settings. This allows us to have some access to all settings before the KV layer becomes available (e.g. during node restarts).When the settings watcher finds a rangefeed update, we write it
cockroach/pkg/server/settingsworker.go
Line 60 in 9c8aa87
The issue is, when we write it, we don't clear out the values which are now unset. See
cockroach/pkg/server/settings_cache.go
Lines 24 to 38 in 9c8aa87
Describe the solution you'd like
We should clear the keys which do exist and are not in the set we want to write.
Additional context
This can be very annoying as we might retain values which are no longer valid. See #68335.
Jira issue: CRDB-10124
Epic: CRDB-6671