Skip to content

Commit

Permalink
resetting current partitioning id when rebuilding the indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
mjonss committed Aug 29, 2024
1 parent 3e4e738 commit c2c629c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/ddl/column.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,10 @@ func (w *worker) updateCurrentElement(t table.Table, reorgInfo *reorgInfo) error
if err != nil {
return errors.Trace(err)
}
if pt, ok := t.(table.PartitionedTable); ok {
// Restart from first partition
reorgInfo.PhysicalTableID = pt.Meta().Partition.Definitions[0].ID
}
}

currentVer, err := getValidCurrentVersion(reorgInfo.jobCtx.store)
Expand Down Expand Up @@ -583,6 +587,10 @@ func (w *worker) updateCurrentElement(t table.Table, reorgInfo *reorgInfo) error
if err != nil {
return errors.Trace(err)
}
if pt, ok := t.(table.PartitionedTable); ok {
// Restart from first partition
reorgInfo.PhysicalTableID = pt.Meta().Partition.Definitions[0].ID
}
}
return nil
}
Expand Down

0 comments on commit c2c629c

Please sign in to comment.