-
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
*: support vector index and adding/dropping vector index when doing syncTableSchema #9451
*: support vector index and adding/dropping vector index when doing syncTableSchema #9451
Conversation
|
/test pull-integration-test |
…yncTableSchema. (pingcap#280) Co-authored-by: JaySon <[email protected]> Co-authored-by: Lloyd-Pottiger <[email protected]>
Signed-off-by: Lloyd-Pottiger <[email protected]>
Signed-off-by: Lloyd-Pottiger <[email protected]>
18d18df
to
f31a181
Compare
Signed-off-by: Lloyd-Pottiger <[email protected]>
/retest |
1 similar comment
/retest |
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
std::atomic_store(&original_table_header, std::make_shared<Block>(toEmptyBlock(original_table_columns))); | ||
|
||
// release the lock because `applyLocalIndexChange` will try to acquire the 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.
Do we need to update applyLocalIndexChange
in this comment?
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.
fixed
ASSERT_EQ(expect_idx2.id, idx1.index_id); | ||
ASSERT_EQ(100, idx1.column_id); | ||
ASSERT_NE(nullptr, idx1.index_definition); | ||
ASSERT_EQ(expect_idx2.vector_index->kind, idx1.index_definition->kind); |
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 open-source TiDB, we remove the field of kind. We use the indexinfo.Tp
instead of this kind of information. link: https://github.com/pingcap/tidb/pull/55839/files#diff-645e83502d90c4de6385256f7499dcdc234ef8b6808559e19570eb2d05c25992R54
{ | ||
LocalIndexInfosPtr index_infos = std::make_shared<LocalIndexInfos>(); | ||
index_infos->reserve(table_info.columns.size() + table_info.index_infos.size()); | ||
for (const auto & col : table_info.columns) |
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 needn't use this logic, because we don't support adding a vector index with a column comment.
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 later PR merge the logic of function initLocalIndexInfos
into generateLocalIndexInfos
.
I think we can remove this for-loop after all PRs from the cse branch are merged? Or this could introduce unnecessary conflict when cherry-pick later PRs
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.
Got it.
for (auto & iter : original_local_index_id_map) | ||
{ | ||
// It means this index is create by column comments which we don't support drop index. | ||
if (iter.first == DB::EmptyIndexID) |
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.
Ditto. And some tests need to update
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.
ditto
Co-authored-by: JaySon <[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
@zimulala: adding LGTM is restricted to approvers and reviewers in OWNERS files. In response to this:
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 kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JaySon-Huang, zanmato1984, zimulala 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:
|
1a781c7
into
pingcap:feature/vector-index
What problem does this PR solve?
Issue Number: ref #9032
Problem Summary:
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note