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

PG-1217: Do not try to create keys for existing files #356

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

dutow
Copy link
Collaborator

@dutow dutow commented Nov 20, 2024

Issue: the storage manager code uses the same key retrieval logic for mdopen and mdcreate, and this logic creates a new key if we are inside a DDL command that can create files.

This means that for ALTERs, if the table is first opened (mdopen) during the ALTER, it creates a key for it, and then it tries to read data from it using decryption, but the data is not actually encrypted.

Fix: only create keys for new files, not existing ones.

Issue: the storage manager code uses the same key retrieval logic
for mdopen and mdcreate, and this logic creates a new key if we
are inside a DDL command that can create files.

This means that for ALTERs, if the table is first opened (mdopen)
during the ALTER, it creates a key for it, and then it tries to
read data from it using decryption, but the data is not actually
encrypted.

Fix: only create keys for new files, not existing ones.
@dutow dutow requested a review from dAdAbird as a code owner November 20, 2024 12:10
@dAdAbird dAdAbird merged commit 0e19bd0 into percona:main Nov 20, 2024
13 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.

2 participants