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

Atomize RenameFile in KeyManagedEncryptedEnv #7

Merged
merged 1 commit into from
Aug 8, 2023

Conversation

acelyc111
Copy link
Member

@acelyc111 acelyc111 commented Jul 21, 2023

apache/incubator-pegasus#1575

Cherry-pick from tikv@93e89a5

fix bug: tikv/tikv#9115

Summary: we need to update encryption metadata via encryption::DataKeyManager, which cannot combine with the actual file operation into one atomic operation. In RenameFile, when the src_file has been removed, power is off, then we may lost the file info of src_file next restart.

Signed-off-by: Xintao hunterlxt@live.com

@acelyc111 acelyc111 changed the base branch from v8.3.2-pegasus to v8.3.2-pegasus-encrypt August 7, 2023 16:12
* adjust logic in KeyManagedEncryptedEnv::RenameFile to avoid poweroff

Signed-off-by: Xintao <hunterlxt@live.com>
@empiredan empiredan merged commit 243004c into pegasus-kv:v8.3.2-pegasus-encrypt Aug 8, 2023
35 checks passed
acelyc111 added a commit that referenced this pull request Aug 16, 2023
apache/incubator-pegasus#1575

Cherry-pick from
tikv@93e89a5

fix bug: tikv/tikv#9115

Summary: we need to update encryption metadata via
encryption::DataKeyManager, which cannot combine with the actual file
operation into one atomic operation. In RenameFile, when the src_file
has been removed, power is off, then we may lost the file info of
src_file next restart.

Signed-off-by: Xintao [hunterlxt@live.com](mailto:hunterlxt@live.com)

Signed-off-by: Xintao <hunterlxt@live.com>
Co-authored-by: Xintao <hunterlxt@live.com>
acelyc111 added a commit that referenced this pull request Sep 15, 2023
apache/incubator-pegasus#1575

Cherry-pick from
tikv@93e89a5

fix bug: tikv/tikv#9115

Summary: we need to update encryption metadata via
encryption::DataKeyManager, which cannot combine with the actual file
operation into one atomic operation. In RenameFile, when the src_file
has been removed, power is off, then we may lost the file info of
src_file next restart.

Signed-off-by: Xintao [hunterlxt@live.com](mailto:hunterlxt@live.com)

Signed-off-by: Xintao <hunterlxt@live.com>
Co-authored-by: Xintao <hunterlxt@live.com>
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