Skip to content
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 for adding/dropping vector index | tidb-test=723d2370f1b3956d22a5ab87b1fc8b9b864ca051 #55839

Merged

Conversation

zimulala
Copy link
Contributor

@zimulala zimulala commented Sep 4, 2024

What problem does this PR solve?

Issue Number: close #55840

Problem Summary:

  • Support for adding/dropping vector index after table creation in the DDL
    • support rollback
    • support sending a request to synchronize schema
      • don't support handling errors when check process.
  • Support for Compatible with Related Admin Functions
    • admin cancel
    • admin check table/index
    • admin cleanup index

What changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner labels Sep 4, 2024
@zimulala zimulala changed the title (W)*: support for adding/dropping vector index (WIP)*: support for adding/dropping vector index Sep 4, 2024
@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Sep 4, 2024
Copy link

tiprow bot commented Sep 4, 2024

Hi @zimulala. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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-sigs/prow repository.

Copy link

codecov bot commented Sep 4, 2024

Codecov Report

Attention: Patch coverage is 67.61269% with 194 lines in your changes missing coverage. Please review.

Please upload report for BASE (feature/vector-index@ee3a596). Learn more about missing BASE report.

Additional details and impacted files
@@                    Coverage Diff                    @@
##             feature/vector-index     #55839   +/-   ##
=========================================================
  Coverage                        ?   57.2832%           
=========================================================
  Files                           ?       1761           
  Lines                           ?     651421           
  Branches                        ?          0           
=========================================================
  Hits                            ?     373155           
  Misses                          ?     252934           
  Partials                        ?      25332           
Flag Coverage Δ
integration 39.4530% <24.9122%> (?)
unit 72.0139% <65.4941%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.9567% <0.0000%> (?)
parser ∅ <0.0000%> (?)
br 62.9298% <0.0000%> (?)

@pingcap pingcap deleted a comment from ti-chi-bot bot Sep 4, 2024
@pingcap pingcap deleted a comment from ti-chi-bot bot Sep 4, 2024
@zimulala zimulala changed the title (WIP)*: support for adding/dropping vector index *: support for adding/dropping vector index Sep 4, 2024
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 4, 2024
@zimulala zimulala force-pushed the zimuxia/add-vector-index branch 2 times, most recently from 978e284 to 3f94ed4 Compare September 4, 2024 09:44
@pingcap pingcap deleted a comment from ti-chi-bot bot Sep 4, 2024
@pingcap pingcap deleted a comment from ti-chi-bot bot Sep 5, 2024
@pingcap pingcap deleted a comment from ti-chi-bot bot Sep 9, 2024
pkg/ddl/cancel_test.go Outdated Show resolved Hide resolved
pkg/ddl/cancel_test.go Outdated Show resolved Hide resolved
pkg/ddl/cancel_test.go Outdated Show resolved Hide resolved
pkg/ddl/executor.go Outdated Show resolved Hide resolved
pkg/ddl/executor.go Outdated Show resolved Hide resolved
pkg/ddl/generated_column.go Outdated Show resolved Hide resolved
pkg/ddl/index.go Show resolved Hide resolved
pkg/ddl/index.go Outdated Show resolved Hide resolved
Comment on lines 791 to 792
// DecodeDropIndexFinishedArgs decodes the drop index job's args when it's finished.
func (job *Job) DecodeDropIndexFinishedArgs() (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are trying to define a struct for each type of DDL jobs (see job_args.go in #55854), this will be removed, FYI

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, please merge master, use job version 2

Copy link
Contributor Author

@zimulala zimulala Sep 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently merge master results in a lot of commits and code changes that are not part of this PR. I will merge master after this PR.

This "drop index" type is just adding an arg, I will not change this PR for the time being, if you change it then, I will synchronously change it.

pkg/parser/model/model.go Outdated Show resolved Hide resolved
pkg/ddl/index.go Outdated Show resolved Hide resolved
pkg/ddl/index.go Outdated
return ver, errors.Trace(err)
}

func doReorgWorkForCreateIndexOnTiFlash(w *worker, jobCtx *jobContext, t *meta.Meta, job *model.Job, tbl table.Table, allIndexInfos []*model.IndexInfo,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use a separate logic to handle it. And the name 'reorg' is not suitable for it. We don't want to consider the vector index during refactoring index.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@ti-chi-bot ti-chi-bot bot added the component/dumpling This is related to Dumpling of TiDB. label Sep 10, 2024
@pingcap pingcap deleted a comment from ti-chi-bot bot Sep 10, 2024
@pingcap pingcap deleted a comment from ti-chi-bot bot Sep 10, 2024
@pingcap pingcap deleted a comment from ti-chi-bot bot Sep 11, 2024
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Sep 14, 2024
@zimulala
Copy link
Contributor Author

/retest-required

Copy link

tiprow bot commented Sep 14, 2024

@zimulala: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest-required

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-sigs/prow repository.

@pingcap pingcap deleted a comment from ti-chi-bot bot Sep 14, 2024
Copy link
Contributor

@AilinKid AilinKid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For planner part rest LGTM

pkg/ddl/index.go Outdated Show resolved Hide resolved
pkg/ddl/index.go Outdated Show resolved Hide resolved
pkg/ddl/index.go Outdated Show resolved Hide resolved
Copy link
Contributor

@tangenta tangenta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest LGTM

@pingcap pingcap deleted a comment from ti-chi-bot bot Sep 14, 2024
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Sep 14, 2024
Copy link

ti-chi-bot bot commented Sep 14, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-09-14 07:44:54.507670441 +0000 UTC m=+687964.248094379: ☑️ agreed by wjhuang2016.
  • 2024-09-14 09:37:39.914980041 +0000 UTC m=+694729.655403965: ☑️ agreed by tangenta.

Copy link

ti-chi-bot bot commented Sep 14, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AilinKid, tangenta, wjhuang2016

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the approved label Sep 14, 2024
@ti-chi-bot ti-chi-bot bot merged commit 384d4ed into pingcap:feature/vector-index Sep 14, 2024
22 checks passed
@zimulala zimulala deleted the zimuxia/add-vector-index branch September 18, 2024 02:00
@zimulala zimulala mentioned this pull request Sep 29, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved component/dumpling This is related to Dumpling of TiDB. lgtm release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants