-
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
Storages: Shutdown the LocalIndexScheduler before shutting down PageStorage/DeltaMergeStore #9712
Storages: Shutdown the LocalIndexScheduler before shutting down PageStorage/DeltaMergeStore #9712
Conversation
…taMergeStore Signed-off-by: JaySon-Huang <tshent@qq.com>
d477249
to
e69d4dd
Compare
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JinheLin, Lloyd-Pottiger The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
…torage/DeltaMergeStore (pingcap#9712) close pingcap#9714 Storages: Shutdown the LocalIndexScheduler before shutting down PageStorage/DeltaMergeStore * Add a method `LocalIndexerScheduler::shutdown()` and ensure the running task are all finished before shutting down the GlobalPageStorage in `ContextShared::shutdown()`. Signed-off-by: JaySon-Huang <tshent@qq.com>
In response to a cherrypick label: new pull request created to branch |
What problem does this PR solve?
Issue Number: close #9714
Problem Summary:
Checkout the logging in issue.
From "Invalid page id, entry not exist [page_id=451.26] [resolve_id=451.26]" and the StackTrace
DB::DM::Segment::restoreSegment(std::__1::shared_ptr<DB::Logger> const&, DB::DM::DMContext&, unsigned long) dbms/src/Storages/DeltaMerge/Segment.cpp:427
we can know that something is wrong when restoring the StableValueSpace of Segment. After adding some debugging message, we know that the error comes from restoring table_id=451, segment_id=8822.Then dump the BlobData from PageStorage "meta". We found that the last two records persisted on disk is invalid as a SegmentMetaInfo.
Before the error happen, we saw that the table_id=451, segment_id=8822 had applied a
SegmentUpdateMeta
task afterDeltaMergeStore::shutdown
.Segment::replaceStableMetaVersion
will access to a already shutdown PageStorage. Causing the WriteBatch wrote broken data.What is changed and how it works?
LocalIndexerScheduler::shutdown()
and ensure the running task are all finished before shutting down the GlobalPageStorage inContextShared::shutdown()
.restoreSegment
failedCheck List
Tests
Side effects
Documentation
Release note