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

Fixing page pruning / compaction crash #15

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

dutow
Copy link
Collaborator

@dutow dutow commented Sep 7, 2023

Issue: the heap AM has a function which automatically compacts pages when certain conditions are met. When this happens, it moves the tuples around within the page. As encryption uses the offset of tuples for decrypting them, this results in garbage data and possible crashes.

Fix: this commit copies the two compaction functions from the server code, and modifies them to re-encrypt data when moved. This is not optimized at all, if needed, we can improve this by a lot.

Also, for now only one execution path is handled from the two, as that's the only one hit by sysbench. We'll have to figure out a testcase for the other and fix that too, for now, it only contains an assert(0).

@hqakhtar hqakhtar force-pushed the tuple_enc branch 2 times, most recently from 3d128f9 to 78c64b3 Compare September 13, 2023 15:31
Issue: the heap AM has a function which automatically compacts pages
when certain conditions are met. When this happens, it moves the
tuples around within the page. As encryption uses the offset of tuples
for decrypting them, this results in garbage data and possible crashes.

Fix: this commit copies the two compaction functions from the server code,
and modifies them to re-encrypt data when moved. This is not optimized at
all, if needed, we can improve this by a lot.

Also, for now only one execution path is handled from the two, as that's
the only one hit by sysbench. We'll have to figure out a testcase for
the other and fix that too, for now, it only contains an assert(0).
@dutow dutow merged commit e99d440 into Percona-Lab:tuple_enc Sep 14, 2023
2 of 3 checks passed
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