Skip to content

fix(sql): overflow in materialized view refresh interval estimate calculation#6233

Merged
bluestreak01 merged 3 commits intomasterfrom
puzpuzpuz_mat_view_refresh_overflow
Oct 6, 2025
Merged

fix(sql): overflow in materialized view refresh interval estimate calculation#6233
bluestreak01 merged 3 commits intomasterfrom
puzpuzpuz_mat_view_refresh_overflow

Conversation

@puzpuzpuz
Copy link
Copy Markdown
Contributor

In case of ~1B row table and daily sampling estimateRowsPerBucket() could overflow and return a very small estimate leading to too large interval size chosen for the materialized view refresh.

@puzpuzpuz puzpuzpuz self-assigned this Oct 6, 2025
@puzpuzpuz puzpuzpuz added Bug Incorrect or unexpected behavior Materialized View labels Oct 6, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Oct 6, 2025

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.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch puzpuzpuz_mat_view_refresh_overflow

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 Oct 6, 2025
@puzpuzpuz
Copy link
Copy Markdown
Contributor Author

@ideoma thanks for the review!

@glasstiger
Copy link
Copy Markdown
Contributor

[PR Coverage check]

😍 pass : 6 / 6 (100.00%)

file detail

path covered line new line coverage
🔵 io/questdb/cairo/mv/MatViewRefreshJob.java 6 6 100.00%

@bluestreak01 bluestreak01 merged commit bdd0fbf into master Oct 6, 2025
35 checks passed
@bluestreak01 bluestreak01 deleted the puzpuzpuz_mat_view_refresh_overflow branch October 6, 2025 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Incorrect or unexpected behavior Materialized View

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants