Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
Co-authored-by: djshow832 <zhangming@pingcap.com>
  • Loading branch information
ldeng-ustc and djshow832 committed Oct 17, 2020
1 parent 84900c0 commit d1ebeec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ddl/partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ func buildPlacementDropBundle(partitionID int64) *placement.Bundle {
}
}

func putRuleBundles(d *ddlCtx, physicalTableIDs []int64) error {
func dropRuleBundles(d *ddlCtx, physicalTableIDs []int64) error {
if d.infoHandle != nil {
bundles := make([]*placement.Bundle, 0, len(physicalTableIDs))
for _, ID := range physicalTableIDs {
Expand Down Expand Up @@ -941,7 +941,7 @@ func (w *worker) onDropTablePartition(d *ddlCtx, t *meta.Meta, job *model.Job) (
if job.Type == model.ActionAddTablePartition {
// It is rollbacked from adding table partition, just remove addingDefinitions from tableInfo.
physicalTableIDs = rollbackAddingPartitionInfo(tblInfo)
err = putRuleBundles(d, physicalTableIDs)
err = dropRuleBundles(d, physicalTableIDs)
if err != nil {
job.State = model.JobStateCancelled
return ver, errors.Wrapf(err, "failed to notify PD the placement rules")
Expand Down Expand Up @@ -970,7 +970,7 @@ func (w *worker) onDropTablePartition(d *ddlCtx, t *meta.Meta, job *model.Job) (
job.State = model.JobStateCancelled
return ver, errors.Trace(err)
}
err = putRuleBundles(d, physicalTableIDs)
err = dropRuleBundles(d, physicalTableIDs)
if err != nil {
job.State = model.JobStateCancelled
return ver, errors.Wrapf(err, "failed to notify PD the placement rules")
Expand Down

0 comments on commit d1ebeec

Please sign in to comment.