-
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 (release-8.5) #9713
Storages: Shutdown the LocalIndexScheduler before shutting down PageStorage/DeltaMergeStore (release-8.5) #9713
Conversation
…taMergeStore Signed-off-by: JaySon-Huang <tshent@qq.com>
catch (DB::Exception & e) | ||
{ | ||
e.addMessage(fmt::format("while restoreSegment, segment_id={}", segment_id)); | ||
e.rethrow(); | ||
} |
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.
Add message about segment_id so that we can know which segment_id is wrong. And we can trace back the logging.
9af662d
to
cff371e
Compare
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
[LGTM Timeline notifier]Timeline:
|
Signed-off-by: JaySon-Huang <tshent@qq.com>
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: CalvinNeo, 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 |
pre-cherry-pick of #9712 on release-8.5 to fix the issue
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