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 snapshot restore to correctly restore tables when snapshot is taken under heavy DDL load #4212

Merged
merged 7 commits into from Feb 14, 2024

Conversation

ideoma
Copy link
Collaborator

@ideoma ideoma commented Feb 14, 2024

Fix issue found by fuzz tests when _meta file may not exist at the snapshot's table folder. This can occur when a table undergoes heavy column add/remove while snapshot files are copied.

Also, the PR contains a minor change to support snapshot id in .txt file. File _snapshot with instance id where the snapshot is created from has an inconvenient format, it's strictly saying a binary file.

This makes it hard to restore from the snapshots created by the instances where id was not set. This PR adds support of _snapshot.txt file which will be used if file _snapshot is empty and it can be added as a text.

@ideoma ideoma changed the title fix(core): fix snapshot restore to correctly restore tables when snapshot is taken under heavy ddl load fix(core): fix snapshot restore to correctly restore tables when snapshot is taken under heavy DDL load Feb 14, 2024
@ideoma
Copy link
Collaborator Author

ideoma commented Feb 14, 2024

[PR Coverage check]

😍 pass : 42 / 48 (87.50%)

file detail

path covered line new line coverage
🔵 io/questdb/cairo/DatabaseSnapshotAgentImpl.java 29 35 82.86%
🔵 io/questdb/cairo/TableUtils.java 13 13 100.00%

@ideoma ideoma merged commit d5d6448 into master Feb 14, 2024
22 checks passed
@ideoma ideoma deleted the fix-snapshot-restore branch February 14, 2024 18:23
@ideoma ideoma mentioned this pull request Feb 14, 2024
1 task
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