Repository navigation
Isolate streaming queries background jobs into the dedicated pool - #105981
Conversation
|
Workflow [PR], commit [62ca38e] Summary: ✅
AI ReviewSummaryThis PR moves Findings❌ Blockers
💡 Nits
Final Verdict
|
| global_context->getSchedulePool().increaseThreadsCount(new_server_settings[ServerSetting::background_schedule_pool_size]); | ||
| global_context->getMessageBrokerSchedulePool().increaseThreadsCount(new_server_settings[ServerSetting::background_message_broker_schedule_pool_size]); | ||
| global_context->getDistributedSchedulePool().increaseThreadsCount(new_server_settings[ServerSetting::background_distributed_schedule_pool_size]); | ||
| global_context->getStreamingSchedulePool().increaseThreadsCount(new_server_settings[ServerSetting::background_streaming_schedule_pool_size]); |
There was a problem hiding this comment.
This call sits inside the main ConfigReloader callback, so it runs during the initial config load as well, not only on later reloads. That means every server startup now constructs BackgroundStreamingSchedulePool even when enable_streaming_queries = 0 (the default experimental gate).
BackgroundSchedulePool::BackgroundSchedulePool eagerly spawns min(background_streaming_schedule_pool_size, background_schedule_pool_initial_size) workers plus the delayed thread and abort()s if the global thread pool cannot provide them. So this split is no longer pay-as-you-go: it adds ~17 threads by default and can turn previously valid max_thread_pool_size configurations into startup failures on installations that never use streaming queries.
Please keep the streaming pool lazy on initial load (for example, only resize it here if it was already created, or otherwise gate eager creation on the feature actually being enabled/used).
|
Updating the branch to fix the |
| fill_from_pool(context->getBufferFlushSchedulePool(), "buffer_flush"); | ||
| fill_from_pool(context->getDistributedSchedulePool(), "distributed"); | ||
| fill_from_pool(context->getMessageBrokerSchedulePool(), "message_broker"); | ||
| fill_from_pool(context->getStreamingSchedulePool(), "streaming"); |
There was a problem hiding this comment.
The table can now emit pool = 'streaming', but the pool column description above still lists only schedule, buffer_flush, distributed, and message_broker. That leaves system.documentation / DESCRIBE TABLE system.background_schedule_pool inaccurate after this change. Please add streaming to the documented set of values.
There was a problem hiding this comment.
@groeneai, submit a PR with the documentation update after this PR is merged. Ping me in the new pr.
There was a problem hiding this comment.
Will do. I'll open the documentation-update PR once this merges and ping you there.
|
📊 Cloud Performance Report ✅ AI verdict: This PR moves streaming background jobs into a dedicated BackgroundStreamingSchedulePool and wires up its settings and metrics — pure background task-scheduling plumbing that does not touch the query-execution path exercised by ClickBench SELECTs. All three flagged queries (Q4, Q18, Q28) showed apparent improvements, but they are off-path and fully consistent with the deterministic verdicts: Q4's -11.4% falls inside master's normal variance band (no_change), and Q18/Q28 remain not_sure with borderline, mixed signals (Q28 is also intrinsically noisy). No real performance change is attributable to this PR. clickbenchFlagged queries (2 of 43)
Change = percent below ×2; the ratio of medians (×N faster/slower) beyond, where percent understates the scale. q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on. tpch_adapted_1_official🟢 No significant changes Debug info
|
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 83/84 (98.81%) · Uncovered code |
PR ClickHouse#105981 added a dedicated 'streaming' background schedule pool for streaming queries background jobs, so system.background_schedule_pool can now emit pool = 'streaming'. Update the pool column description (source of truth in StorageSystemBackgroundSchedulePool.cpp, mirrored in the autogenerated docs page) and the table description accordingly. Co-Authored-By: Claude Opus 4.8 <[email protected]>
…cheduling-settings Isolate streaming queries background jobs into the dedicated pool
PR ClickHouse#105981 added a dedicated 'streaming' background schedule pool for streaming queries background jobs, so system.background_schedule_pool can now emit pool = 'streaming'. Update the pool column description (source of truth in StorageSystemBackgroundSchedulePool.cpp, mirrored in the autogenerated docs page) and the table description accordingly. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
This patch moves the background streaming queries jobs to a dedicated pool.
Version info
26.7.1.827(included in26.7and later)