Skip to content

fix(core): fix split partitions not being automatically squashed#5924

Merged
bluestreak01 merged 17 commits intomasterfrom
chore-reduce-memory-usage-checkpoing-fuzz-test
Jul 10, 2025
Merged

fix(core): fix split partitions not being automatically squashed#5924
bluestreak01 merged 17 commits intomasterfrom
chore-reduce-memory-usage-checkpoing-fuzz-test

Conversation

@ideoma
Copy link
Copy Markdown
Collaborator

@ideoma ideoma commented Jul 9, 2025

Fixes a bug when too many split partitions are created and they are not automatically squashed. This could happen when realtime data is written by multiple connections and the volume of data is big, so that it constantly produces many split partitions. If this process continues non-stop for a long time, longer than the 2 hours for hourly partitioned tables (or 2 days for daily partitioned) at some point splits are not automatically squashed and the number of split partitions constantly grow.

Also, fixes assertion error in processing

ALTER TABLE x SQUASH PARTITIONS

The error can happen in the very extreme cases of materialized view processing when a significant data range is removed as a result of the view refresh and there is no logical partition to squash into, for example, when there is no partition 2022-03-24, only a split exists 2022-03-24T02:23. The fix is to create an empty logical partition 2022-03-24 before the force squashing.

Also fixes CI failures like

global RSS memory limit exceeded [usage=6540382612, RSS_MEM_LIMIT=6545969910, size=16777216, memoryTag=45]

It's done by reducing the sizes of random arrays generated in tests and also reducing the column allocation sizes in Checkpoint Fuzz Tests.

@ideoma ideoma changed the title chore(core): reduce fuzz tests memory allocation fix(core): fix rare table suspended in squash partiton SQL processing Jul 9, 2025
@ideoma ideoma changed the title fix(core): fix rare table suspended in squash partiton SQL processing fix(core): fix split partitions not being automatically squashed Jul 10, 2025
bluestreak01
bluestreak01 previously approved these changes Jul 10, 2025
@glasstiger
Copy link
Copy Markdown
Contributor

[PR Coverage check]

😍 pass : 19 / 20 (95.00%)

file detail

path covered line new line coverage
🔵 io/questdb/cairo/TableWriter.java 16 17 94.12%
🔵 io/questdb/std/Rnd.java 3 3 100.00%

@bluestreak01 bluestreak01 merged commit 50331a2 into master Jul 10, 2025
34 checks passed
@bluestreak01 bluestreak01 deleted the chore-reduce-memory-usage-checkpoing-fuzz-test branch July 10, 2025 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants