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 Rename operation when encryption is enabled (#224) #225

Merged
merged 1 commit into from
Jan 27, 2021
Merged

Atomize Rename operation when encryption is enabled (#224) #225

merged 1 commit into from
Jan 27, 2021

Conversation

yiwu-arbug
Copy link
Collaborator

@yiwu-arbug yiwu-arbug commented Jan 27, 2021

Cherry-picking #224.

#222 used LinkFile instead of RenameFile api of key manager. But LinkFile needs check the dst file information, in RenameFile logic, we don't care about that. So just skip encryption for current file.

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

Signed-off-by: Xintao <hunterlxt@live.com>
@@ -24,6 +24,25 @@ namespace rocksdb {
static const std::string kRocksDbTFileExt = "sst";
static const std::string kLevelDbTFileExt = "ldb";
static const std::string kRocksDBBlobFileExt = "blob";
static const std::string kUnencryptedTempFileNameSuffix = "dbtmp.plain";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
static const std::string kUnencryptedTempFileNameSuffix = "dbtmp.plain";
static const std::string kUnencryptedTempFileNameSuffix = kTempFileNameSuffix + ".plain";

and move this nearby kTempFileNameSuffix?

Comment on lines +438 to +439
Status s = target()->LinkFile(src_fname, dst_fname);
return s;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Status s = target()->LinkFile(src_fname, dst_fname);
return s;
return target()->LinkFile(src_fname, dst_fname);

@yiwu-arbug
Copy link
Collaborator Author

@tabokie this is a cherry-pick. Let's keep it as is.

@Connor1996
Copy link
Member

@yiwu-arbug Please mention the cherry-picked PR in the description

@yiwu-arbug yiwu-arbug merged commit 22d055c into tikv:tikv-5.0-rc Jan 27, 2021
@yiwu-arbug yiwu-arbug deleted the atomic_5.0rc branch January 27, 2021 07:39
yiwu-arbug pushed a commit to tikv/rust-rocksdb that referenced this pull request Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants