*: support vector index and adding/dropping vector index when doing syncTableSchema#9451
Conversation
|
/test pull-integration-test |
…yncTableSchema. (pingcap#280) Co-authored-by: JaySon <tshent@qq.com> Co-authored-by: Lloyd-Pottiger <60744015+Lloyd-Pottiger@users.noreply.github.com>
18d18df to
f31a181
Compare
|
/retest |
1 similar comment
|
/retest |
|
|
||
| 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.
Do we need to update applyLocalIndexChange in this comment?
| 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.
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.
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.
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
| 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.
Ditto. And some tests need to update
Co-authored-by: JaySon <tshent@qq.com>
|
@zimulala: adding LGTM is restricted to approvers and reviewers in OWNERS files. DetailsIn 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 DetailsNeeds 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
Documentation
Release note