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

executor: support cleanup dangling index data command #6102

Merged
merged 19 commits into from
Apr 2, 2018
Merged
5 changes: 4 additions & 1 deletion executor/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,10 @@ func (b *executorBuilder) buildCleanupIndex(v *plan.CleanupIndex) Executor {
}
idxName := strings.ToLower(v.IndexName)
var index table.Index
for _, idx := range t.WritableIndices() {
for _, idx := range t.Indices() {
if idx.Meta().State != model.StatePublic {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think to do this check as line 334 is better.

continue
}
if idxName == idx.Meta().Name.L {
index = idx
break
Expand Down