Repository navigation
Make to_throw settings cheangeable without restart - #106821
alexey-milovidov merged 8 commits into
Conversation
|
Workflow [PR], commit [532cac8] Summary: ✅
AI ReviewSummaryThis PR makes the Final Verdict
|
57d2be5 to
d088f3d
Compare
af5f2b9 to
6892b01
Compare
| void Context::setMaxNamedCollectionNumToThrow(size_t max_named_collection_to_throw) | ||
| { | ||
| std::lock_guard lock(shared->mutex); | ||
| shared->max_named_collection_num_to_throw = max_named_collection_to_throw; |
There was a problem hiding this comment.
But no... let's aim for better. Can we refactor this code to remove repetitions for settings that don't require any additional actions on change?
There was a problem hiding this comment.
I think X-macro approach is the best here, since we have single source of truth for settings and many places where they are instantiated. I've added x-macro and instantiations for getters/setters/variable declarations and couple other places
| node2.query("DROP NAMED COLLECTION IF EXISTS nc_reload_test") | ||
|
|
||
|
|
||
| def test_runtime_config_reload_of_limits(started_cluster): |
There was a problem hiding this comment.
A test that is almost tautological - not good. Let's be more creative with our tests.
There was a problem hiding this comment.
Doing more intelligent test now, changing limits down and back
1d12974 to
15d056b
Compare
9fcccbd to
48792f6
Compare
Squashes prior branch commits: - Make `to_throw` settings changeable without restart - Respect settings in local `clickhouse` - Add runtime settings update test - Extend tests and respect `server_settings` - Condense duplicated `Context` code with X-macros - Fix style check and warning format messages
3f2cb8f to
03c5aaf
Compare
…hangeable-to-throw-settings
|
Merged the latest CI status on the previous run (report)The only red was This is a known master-wide flake, unrelated to this PR — it changes Review feedbackBoth unresolved review threads appear addressed in the current code:
The automated AI review now reports ✅ Approve. @alexey-milovidov, your |
Status after the latest
|
Update: a second CI red appeared — also a known flakeAfter my previous status note (where the only red was
So both current reds are pre-existing flakes ( @groeneai, FYI: the |
|
@alexey-milovidov Looked into it. Confirmed unrelated to this PR, and the real signature is rarer than the headline suggests. I'm taking the fix-PR route. The actual flake. Two distinct things hide under "02441 failed on ~10 days":
Reports for the real signature: 2026-06-30 (this PR) and 2026-04-07. Root cause. The test runs Plan. This test already has two prior closed flaky issues (#79988, #81948) and two prior test-only fix PRs (#89947, #90032) that reduced but did not eliminate it. I'll reproduce deterministically by inflating the merge-selecting backoff so assignment misses the window, then submit a separate test-only fix PR (likely pinning the merge-selecting cadence low so the |
|
Opened the fix for the |
|
@alexey-milovidov Kindly ping |
|
Only two failures block this PR: |
The first is flaky, unrelated to my changes: #108926 Couldn't find an issue for a second one, but found the same problem in another PR #109018 https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=108770&sha=bb760616d54e3d8e5d20968022085506c31b5f37&name_0=PR&name_1=Stress%20test%20%28arm_tsan%29&name_1=Stress%20test%20%28arm_tsan%29 |
…hangeable-to-throw-settings
…o-throw-settings' into uberdever/feature/changeable-to-throw-settings
Address review: the existing integration test in `test_table_db_num_limit` exercises only the server `ConfigReloader` path. In `clickhouse-local` there is no `ConfigReloader`, so the `max_*_num_to_throw` limits are enforced solely because their mirrors are seeded in `Context::setApplicationType`. A regression there would silently disable enforcement in `clickhouse-local` while the server-based test keeps passing. Add a focused stateless test that runs `clickhouse-local` with `max_table_num_to_throw=1` and checks that the second `CREATE TABLE` throws `TOO_MANY_TABLES`. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Addressed the AI review's required action: added a focused The only remaining CI failure is |
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 209/209 (100.00%) · Uncovered code |
|
The only red check at |
ac01c84
…/changeable-to-throw-settings Make `to_throw` settings cheangeable without restart

Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Made
max_named_collection_num_to_throw,max_table_num_to_throw,max_replicated_table_num_to_throw,max_view_num_to_throw,max_dictionary_num_to_throw, andmax_database_num_to_throwchangeable without a server restart.