Skip to content

Commit

Permalink
ddl: fix exchange partition rollback might cause info schema full load (
Browse files Browse the repository at this point in the history
#56686)

close #56685
  • Loading branch information
D3Hunter authored Oct 17, 2024
1 parent 457ff81 commit 5e1423c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/ddl/schema_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ func SetSchemaDiffForExchangeTablePartition(diff *model.SchemaDiff, job *model.J
diff.AffectedOpts = []*model.AffectedOption{{
TableID: args.PTTableID,
}}
if job.SchemaState != model.StatePublic {
// when job state transit from rolling-back to rollback-done, the schema state
// is also public, diff.TableID should be the old non-partitioned table ID too.
if job.State == model.JobStateRollbackDone || job.SchemaState != model.StatePublic {
// No change, just to refresh the non-partitioned table
// with its new ExchangePartitionInfo.
diff.TableID = job.TableID
Expand Down

0 comments on commit 5e1423c

Please sign in to comment.