Skip to content

ddl : ddl forbid create / add / rename /drop index for cache table #29707

Merged
ti-chi-bot merged 7 commits intopingcap:masterfrom
JayLZhou:forbid_index
Nov 15, 2021
Merged

ddl : ddl forbid create / add / rename /drop index for cache table #29707
ti-chi-bot merged 7 commits intopingcap:masterfrom
JayLZhou:forbid_index

Conversation

@JayLZhou
Copy link
Contributor

@JayLZhou JayLZhou commented Nov 11, 2021

Issue Number: close #29659
Problem Summary:
This is a subtask of #25293

What is changed and how it works?

  • Index operator shoud forbid for cache table
  • The following operator is valid.
Alter table t nocache
.... do some index operator

Check List

Tests

  • Unit test

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

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Nov 11, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lcwangchao
  • tiancaiamao

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Details

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 11, 2021
if err != nil || tblInfo == nil {
return ver, errors.Trace(err)
}
if tblInfo.TableCacheStatusType != model.TableCacheStatusDisable {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Better to check it before schedule to avoid unnecessary job

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you are right.

@JayLZhou JayLZhou requested a review from lcwangchao November 12, 2021 08:00
@JayLZhou
Copy link
Contributor Author

/run-check_dev_2

return errors.Trace(err)
}

if t.Meta().TableCacheStatusType != model.TableCacheStatusDisable {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should do checking both before and in schedule.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you mean is double check?

@JayLZhou JayLZhou requested a review from lcwangchao November 14, 2021 06:14
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 14, 2021
@JayLZhou
Copy link
Contributor Author

/cc @tiancaiamao

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Nov 15, 2021
@tiancaiamao
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

DetailsCommit hash: 448131c

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 15, 2021
@JayLZhou
Copy link
Contributor Author

/ruh-check_dev

@JayLZhou
Copy link
Contributor Author

JayLZhou commented Nov 15, 2021

/run-check_dev

1 similar comment
@JayLZhou
Copy link
Contributor Author

/run-check_dev

@ti-chi-bot ti-chi-bot merged commit 9c6540f into pingcap:master Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

For cache table should not be allowed to create indexes

4 participants