Repository navigation
Revert "Make getServerSetting return live values for runtime-changeable settings" - #106930
Conversation
|
Workflow [PR], commit [cd05016] Summary: ✅
AI ReviewSummaryThis PR reverts the live-value path added for Findings❌ Blockers
Tests
Final VerdictStatus: ❌ Block Minimum required action: remove the remaining unsynchronized read path, or narrow the PR/linked issue claim and provide evidence that the remaining path is outside the intended race fix. |
| } | ||
|
|
||
| return server_settings.get(setting_name); | ||
| return Context::getGlobalContextInstance()->getServerSettings().get(setting_name); |
There was a problem hiding this comment.
This still leaves an unsynchronized read of shared->server_settings for settings that SYSTEM RELOAD CONFIG mutates under shared->mutex. For example, Context::setS3QueueDisableStreaming and Context::setMessageQueueDisableInsertion write these fields while holding shared->mutex, but getServerSetting('s3queue_disable_streaming') and getServerSetting('message_queue_disable_insertion') reach this get call without taking that lock. That means the PR removes the broad copy race from the reverted helper, but it does not actually close the reload race promised by the PR/linked issue; a concurrent reload and query of either setting can still race on the same SettingFieldBool.
Please route this through a synchronized accessor, or special-case these runtime-mutated settings to use the locked Context getters instead of reading getServerSettings directly.
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered by tests: 26/26 (100.00%) | Lost baseline coverage (was covered on master, now uncovered in this PR): 1 line(s) · Uncovered code |
Reverts #105172
Closes #106902
Version info
26.6.1.604