-
Notifications
You must be signed in to change notification settings - Fork 409
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 wal may dump write diff type in same page_id #4850
Fix wal may dump write diff type in same page_id #4850
Conversation
[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. |
auto data_max_ids = data_storage->restore(); | ||
auto meta_max_ids = meta_storage->restore(); | ||
|
||
assert(log_max_ids.size() == 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.
We don't use assert in normal logic besides test cases. Manually throw exceptions instead.
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.
That make no sense if log_max_ids.size() != 1
. And I don't think using exception
replace assert
is a good thing.
IMO:
- If it's logically clear and you do know it inited where. Then used
assert
to check . - If some value changes a lot of time, Then the
exception
will replace theassert
to avoid some problems.
So back to this assert
, it's clear to know that log_max_ids
from V2 must have size 1
. So I think just adding an assert is ok to avoid logical error?
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.
I think assert is OK here
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 with small comment
Co-authored-by: JaySon <[email protected]>
Co-authored-by: JaySon <[email protected]>
/merge |
@jiaqizho: 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: 2300799
|
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
/run-all-tests |
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
…tics into move-getmaxid-to-getapplymaxid
/run-all-tests |
/run-integration-test |
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
/merge |
@jiaqizho: 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: b9c3e2e
|
@jiaqizho: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. 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. |
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
What problem does this PR solve?
Issue Number: close #4849
Problem Summary:
restore()
restore()
, we will call thegcInMemEntries()
will clean updel
id in MVCCgcInMemEntries()
has cleaned them up.getMaxId()
will get 0.restore()
(no dump happened, the disk data don't get compacted)What is changed and how it works?
we should call
getMaxId()
before MVCC GC. But we can't do that, Because MVCC will be ready afterrestore()
.Changes
restore()
), it won't be a problem.restore()
, it never call thegetMaxId()
. So we removedgetMaxId
. Instead, we userestore()
to return the max_ids.Will disable rename in delta-merge-tests
rename
in delta-merge-tests will makeDeltaMergeStore
shutdown and restore. But it won't makeGlobalPathPool
restore.StrogaePool
restore, max_id will be wrong.DeltaMergeStore
).Check List
Tests
Side effects
Documentation
Release note