Check a status in InstallOutputBlobFiles and Rewrite BatchWriteNewIndices#243
Open
apple-ouyang wants to merge 3 commits intotikv:masterfrom
Open
Check a status in InstallOutputBlobFiles and Rewrite BatchWriteNewIndices#243apple-ouyang wants to merge 3 commits intotikv:masterfrom
apple-ouyang wants to merge 3 commits intotikv:masterfrom
Conversation
Signed-off-by: Wang Haitao <wanghaitao.ouyang@foxmail.com>
to have the same interface Signed-off-by: Wang Haitao <wanghaitao.ouyang@foxmail.com>
Signed-off-by: Wang Haitao <wanghaitao.ouyang@foxmail.com>
Connor1996
reviewed
May 30, 2022
| if (!ParseInternalKey(ctx->key, &ikey)) { | ||
| *s = Status::Corruption(Slice()); | ||
| return; | ||
| return Status::Corruption(Slice());; |
Contributor
Author
There was a problem hiding this comment.
Ok, I'll add one
| } | ||
| if (!gc_merge_rewrite_) { | ||
| merge_blob_index.EncodeToBase(&index_entry); | ||
| const BlobIndex &index = ctx->new_blob_index; |
Member
There was a problem hiding this comment.
why is it different from before?
Contributor
Author
There was a problem hiding this comment.
Because the merge blob index is only used in the second if branch. I just think we should only declare the merge blob index when we truly use it. This will help others understand the code easily.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The issue is here #238.
I push 3 commits.
One is add a status check.
One is change the
void BatchWriteNewIndices(BlobFileBuilder::OutContexts& contexts, Status* s)toStatus BatchWriteNewIndices(BlobFileBuilder::OutContexts& contexts)One is delete MergeBlobIndex if we just don't use it when gc_merge_rewrite_ = false.
If you want, I can squash the 3 commit into 1 commit.