Skip to content

Commit

Permalink
Only reset SchemaState when binlog.SchemaState is delete only
Browse files Browse the repository at this point in the history
  • Loading branch information
suzaku committed Nov 20, 2019
1 parent 80b32c0 commit 99c6ed1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drainer/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,9 @@ func (c *Collector) syncBinlog(item *binlogItem) error {
if skipJob(job) {
return nil
}
job.SchemaState = model.SchemaState(binlog.DdlSchemaState)
if model.SchemaState(binlog.DdlSchemaState) == model.StateDeleteOnly {
job.SchemaState = model.StateDeleteOnly
}
item.SetJob(job)
ddlJobsCounter.Add(float64(1))
}
Expand Down

0 comments on commit 99c6ed1

Please sign in to comment.