Skip to content

fix(core): disable materialized view parallel SQL on low-core machines#6891

Merged
ideoma merged 8 commits intomasterfrom
chore-min-4-cores-parallel-sql
Mar 24, 2026
Merged

fix(core): disable materialized view parallel SQL on low-core machines#6891
ideoma merged 8 commits intomasterfrom
chore-min-4-cores-parallel-sql

Conversation

@nwoolmer
Copy link
Copy Markdown
Contributor

@nwoolmer nwoolmer commented Mar 20, 2026

Summary

  • PropServerConfiguration defaults cairo.mat.view.parallel.sql.enabled to false on machines with fewer than 4 available processors
  • All other parallel SQL features (filter, group by, top-k, horizon join, window join, parquet read) remain enabled regardless of core count
  • Users can still explicitly enable mat view parallel SQL via configuration on low-core machines

nwoolmer and others added 2 commits March 20, 2026 17:01
Machines with fewer than 4 available processors no longer enable
parallel SQL execution (filter, group by, top-k, horizon join, window
join, parquet read) by default. Users can still explicitly enable
parallel execution via configuration properties. This restores a
previous safeguard that was inadvertently removed.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@nwoolmer nwoolmer added the Core Related to storage, data type, etc. label Mar 20, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 20, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fd6a3c14-7f7c-47df-bd29-c52b4d3b0cdd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore-min-4-cores-parallel-sql

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

ideoma
ideoma previously approved these changes Mar 20, 2026
ideoma and others added 3 commits March 24, 2026 11:18
Machines with fewer than 4 available processors now default
cairo.mat.view.parallel.sql.enabled to false. Users can still
explicitly enable it via configuration. This is a narrower
safeguard than the reverted commit which disabled all parallel
SQL features on low-core machines.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
The parallel SQL CPU restriction was reverted, so these test
workarounds that force-enabled parallel filter, group by, top-k,
and window join are no longer needed. defaultParallelSqlEnabled
is back to `queryWorkers > 0` which is true on any machine.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@ideoma ideoma changed the title chore(core): require minimum 4 CPU cores for parallel SQL execution fix(core): disable materialized view parallel SQL on low-core machines Mar 24, 2026
ideoma
ideoma previously approved these changes Mar 24, 2026
PropServerConfigurationTest.testAllDefaults: make the
isMatViewParallelSqlEnabled assertion conditional on CPU count,
matching the new default (cpuAvailable >= 4).

MatViewTest.testQueryError and testRecursiveInvalidationOnFailedRefresh:
force CAIRO_MAT_VIEW_PARALLEL_SQL_ENABLED=true via setProperty so that
npe() in the WHERE clause goes through the parallel reduce path and
produces the expected "unexpected reduce error" message regardless of
core count.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@glasstiger
Copy link
Copy Markdown
Contributor

[PR Coverage check]

😍 pass : 1 / 1 (100.00%)

file detail

path covered line new line coverage
🔵 io/questdb/PropServerConfiguration.java 1 1 100.00%

@ideoma ideoma merged commit 6de4bd4 into master Mar 24, 2026
51 checks passed
@ideoma ideoma deleted the chore-min-4-cores-parallel-sql branch March 24, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Core Related to storage, data type, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants