-
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
storage: Support adding vector index in background #9411
storage: Support adding vector index in background #9411
Conversation
Signed-off-by: Wish <[email protected]> Signed-off-by: Lloyd-Pottiger <[email protected]> Co-authored-by: Wish <[email protected]> Co-authored-by: JaySon-Huang <[email protected]>
f9422af
to
707e91c
Compare
} | ||
else if (global_context->getSharedContextDisagg()->isDisaggregatedStorageMode()) | ||
{ | ||
global_context->initializeGlobalLocalIndexerScheduler( |
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.
Can you explain this math?
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.
initialize the LocalIndexerScheduler introduce by #9383, all vector index build task will be schedule by this scheduler.
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 checked that PR, and I can not figure out why it is * 8 / 10
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 no compute task in write node.
// Set the pool size to 80% of logical cores and 60% of memory
// to take full advantage of the resources and avoid blocking other tasks like writes and compactions.
Add some comments.
Signed-off-by: Lloyd-Pottiger <[email protected]>
{ | ||
RUNTIME_CHECK(segment != nullptr); | ||
|
||
// TODO(local index): There could be some indexes are built while some indexes is not yet built after DDL |
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 could be some indexes are being built?
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.
Just ignore it, will remove it in a later PR.
for (const auto & seg_id : segment_ids) | ||
{ | ||
auto segment = id_to_segment[seg_id]; | ||
auto new_segment = segmentUpdateMeta(lock, dm_context, segment, new_dmfiles); |
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.
In segmentUpdateMeta, we will acquire a lock for using Lock = std::unique_lock<std::recursive_mutex>;
of a DeltaValueSpace for a Segment, while we are holding also a unique_lock of DM.
I wonder if the lock is too grain? AFAIK, the segment lock is only used in replaceStableMetaVersion
. So I wonder if we could do replaceStableMetaVersion
without DM lock?
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.
Accquiring DM lock to make sure segment will not be abandoned by other thread.
Signed-off-by: Lloyd-Pottiger <[email protected]>
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.
Directly bump the version for supporting building index on both DeltaVS and StableVS
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.
The change looks minimal compared as CSE version.
Signed-off-by: Lloyd-Pottiger <[email protected]>
dbms/src/Storages/DeltaMerge/DeltaMergeStore_InternalSegment.cpp
Outdated
Show resolved
Hide resolved
dbms/src/Storages/DeltaMerge/DeltaMergeStore_InternalSegment.cpp
Outdated
Show resolved
Hide resolved
dbms/src/Storages/DeltaMerge/DeltaMergeStore_InternalSegment.cpp
Outdated
Show resolved
Hide resolved
@@ -1470,8 +1465,11 @@ SegmentPtr Segment::replaceStableMetaVersion( | |||
|
|||
wbs.writeAll(); | |||
|
|||
LOG_DEBUG(log, "ReplaceStableMetaVersion - Finish, new_stable_files={}", new_stable_files_str()); | |||
|
|||
LOG_DEBUG( |
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.
Suggest LOG_INFO
.
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 will print info log in DeltaMergeStore::segmentUpdateMeta
Signed-off-by: Lloyd-Pottiger <[email protected]>
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: breezewish, JaySon-Huang 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:
|
What problem does this PR solve?
Issue Number: ref #9032
Problem Summary:
What is changed and how it works?
Check List
Tests
Side effects
STORAGE_FORMAT_V7
Documentation
Release note