Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): fix incorrect truncation of WAL table partition leading to read errors #3451

Merged
merged 2 commits into from
Jun 7, 2023

Conversation

ideoma
Copy link
Collaborator

@ideoma ideoma commented Jun 6, 2023

Fix WAL table writing bug which can lead to incorrect partition data truncation. This then manifests in the reading error similar to

java.lang.InternalError: a fault occurred in a recent unsafe memory access operation in compiled Java code

The issue was that Table Writer did not advance column files truncate positions under certain circumstances before switching to the next partition while applying WAL. This results in the incorrect trimming of the partition and if the trimming difference is bigger than File page size it leads to read errors like the one listed above.

@ideoma
Copy link
Collaborator Author

ideoma commented Jun 6, 2023

[PR Coverage check]

😍 pass : 6 / 6 (100.00%)

file detail

path covered line new line coverage
🔵 io/questdb/cairo/TableUtils.java 1 1 100.00%
🔵 io/questdb/cairo/TableWriter.java 2 2 100.00%
🔵 io/questdb/cairo/MapWriter.java 3 3 100.00%

@bluestreak01 bluestreak01 merged commit bd1a840 into master Jun 7, 2023
22 checks passed
@bluestreak01 bluestreak01 deleted the fix-write-truncate-partition-incorrectly branch June 7, 2023 12:52
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.

None yet

2 participants