-
Notifications
You must be signed in to change notification settings - Fork 411
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
Fix restore problems in PageStorage. #4350
Conversation
Signed-off-by: jiaqizho <[email protected]>
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -44,6 +44,7 @@ PageStorageImpl::~PageStorageImpl() = default; | |||
|
|||
void PageStorageImpl::restore() | |||
{ | |||
// TODO: clean up blobstore. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What thing do you plan to optimize by adding this "TODO" comment? Can you explain more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is such an extreme example.
Before shutdown:
blob 1 : valid entries 10
blob 2 : valid entries 100
blob 3 : valid entries 100
after shutdown, Then we do the restore:
blob 1 : all of entries is invalid
blob 2 : valid entries less than 100, but still exist valid entry
blob 3 : valid entries less than 100, but still exist valid entry
Then blob 1 won't restored, because it has not any valid entries.
But at this time, we also won't remove it in the disk. Because it is not created on memory. So we need add a scan after we restored pagestorage
. Then removed blob 1
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get it
/hold |
/run-unit-test |
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
@JaySon-Huang: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
This pull request has been accepted and is ready to merge. Commit hash: da2a63a
|
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
/merge |
@JaySon-Huang: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
/unhold |
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
Signed-off-by: JaySon-Huang <[email protected]>
/merge |
@JaySon-Huang: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
This pull request has been accepted and is ready to merge. Commit hash: a251e92
|
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
Signed-off-by: jiaqizho [email protected]
What problem does this PR solve?
Issue Number: ref #3594
Problem Summary:
restore
, we should letmvcc
callgcInMemEntries
, Then it won't ask BlobStore to cleanup invalid data.getEntry
method inmvcc
will return a null entry that is being refed but has already accepteddel
op(happened inrestore
method). Then BlobStore won't apply for this entry, so this entry will lose.What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note