Conversation
CUBESTORE_MAX_CONCURRENT_QUERY_PLANS and CUBESTORE_MAX_QUEUED_QUERY_PLANS were added in #11924 to bound logical-plan concurrency but were never added to the environment variables reference. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mmz1eJ4vNFM32PNwwcBJ4s
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
|
Claude finished @keydunov's task in 1m 47s —— View job Review complete — 1 medium, 1 medium, 1 low (3 inline comments)Details
Findings
Verified correct: Review threads: the listing returned 0 of my own threads on this PR — none to resolve, none re-affirmed. |
| is reached. A query that arrives once the queue is full is rejected rather | ||
| than queued, since planning isn't covered by | ||
| [`CUBESTORE_QUERY_TIMEOUT`](#cubestore_query_timeout) and an unbounded queue | ||
| would otherwise grow without limit. |
There was a problem hiding this comment.
"planning isn't covered by CUBESTORE_QUERY_TIMEOUT" is backwards — the planning wait is bounded by it. rust/cubestore/cubestore/src/queryplanner/mod.rs:296 passes Duration::from_secs(config.query_timeout()) as the throttle's max_wait, and planning_throttle.rs:84-90 rejects with:
Waited longer than {} s (CUBESTORE_QUERY_TIMEOUT) for a query planning slot. Raise CUBESTORE_MAX_CONCURRENT_QUERY_PLANS to plan more queries at once.
So the queue cap isn't there because the wait is unbounded in time; it's there because the number of waiters is otherwise unbounded (memory, and a queue nobody can drain within the timeout anyway). The timeout-based rejection is also a second failure mode a reader needs to know about and this text currently denies it exists.
| is reached. A query that arrives once the queue is full is rejected rather | |
| than queued, since planning isn't covered by | |
| [`CUBESTORE_QUERY_TIMEOUT`](#cubestore_query_timeout) and an unbounded queue | |
| would otherwise grow without limit. | |
| is reached. A query that arrives once the queue is full is rejected immediately, | |
| rather than joining an unbounded queue. A query that does get a queue slot waits | |
| up to [`CUBESTORE_QUERY_TIMEOUT`](#cubestore_query_timeout) seconds for a | |
| planning slot and is rejected if none frees up in that time. |
| | Possible Values | Default in Development | Default in Production | | ||
| | --------------- | ---------------------- | --------------------- | | ||
| | A valid number | `5000` | `5000` | |
There was a problem hiding this comment.
0 is missing from the possible values, and it means the opposite of what a reader would assume. planning_throttle.rs:97 guards with if self.max_queued != 0 && queued > self.max_queued, so 0 disables the queue limit — unbounded queue — rather than "queue nothing, reject immediately". Someone reaching for 0 to get fail-fast behaviour gets the unbounded queue this variable exists to prevent.
| | Possible Values | Default in Development | Default in Production | | |
| | --------------- | ---------------------- | --------------------- | | |
| | A valid number | `5000` | `5000` | | |
| Set to `0` to disable the queue limit, which lets the queue grow without bound. | |
| | Possible Values | Default in Development | Default in Production | | |
| | ------------------------------- | ---------------------- | --------------------- | | |
| | `0` or a positive integer | `5000` | `5000` | |
| | Possible Values | Default in Development | Default in Production | | ||
| | ------------------------------------ | ---------------------- | --------------------- | | ||
| | `auto`, `0`, or a positive integer | `auto` | `auto` | |
There was a problem hiding this comment.
Table pipes are misaligned — the separator row is one cell wider than the header, and the auto cells carry a trailing space. Renders fine, but every neighbouring entry in this file keeps the columns aligned.
| | Possible Values | Default in Development | Default in Production | | |
| | ------------------------------------ | ---------------------- | --------------------- | | |
| | `auto`, `0`, or a positive integer | `auto` | `auto` | | |
| | Possible Values | Default in Development | Default in Production | | |
| | ---------------------------------- | ---------------------- | --------------------- | | |
| | `auto`, `0`, or a positive integer | `auto` | `auto` | |
Check List
Description of Changes Made
PR #11924 (
feat(cubestore): Limit how many logical plans are built at once) added two new environment variables to CubeStore but never documented them:CUBESTORE_MAX_CONCURRENT_QUERY_PLANS— caps how many SQL queries build a logical plan at once (defaultauto, sized to twice the available CPU cores with a floor of 4;0disables the gate).CUBESTORE_MAX_QUEUED_QUERY_PLANS— caps how many queries may wait for a planning slot before being rejected (default5000).This adds both to
docs-mintlify/reference/configuration/environment-variables.mdx, in alphabetical order alongside the otherCUBESTORE_*variables, following the existing table format used by neighboring entries.🤖 Generated with Claude Code
https://claude.ai/code/session_01Mmz1eJ4vNFM32PNwwcBJ4s
Generated by Claude Code