Skip to content

Commit

Permalink
ddl: filter zero job IDs when puting DDLAllSchemaVersionsByJob key (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ystaticy authored Jan 17, 2025
1 parent 27bf9c3 commit 36e8e34
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/ddl/schemaver/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,10 @@ func (s *etcdSyncer) UpdateSelfVersion(ctx context.Context, jobID int64, version
var err error
var path string
if variable.EnableMDL.Load() {
// If jobID is 0, it doesn't need to put into etcd `DDLAllSchemaVersionsByJob` key.
if jobID == 0 {
return nil
}
path = fmt.Sprintf("%s/%d/%s", util.DDLAllSchemaVersionsByJob, jobID, s.ddlID)
err = util.PutKVToEtcdMono(ctx, s.etcdCli, keyOpDefaultRetryCnt, path, ver)
} else {
Expand Down

0 comments on commit 36e8e34

Please sign in to comment.