Skip to content

Commit

Permalink
cherry pick pingcap#1017 to release-4.0
Browse files Browse the repository at this point in the history
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
  • Loading branch information
amyangfei authored and ti-srebot committed Oct 22, 2020
1 parent 09c1fd6 commit be7b835
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cdc/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -551,8 +551,11 @@ func (p *processor) flushTaskStatusAndPosition(ctx context.Context) error {
for _, tableID := range tablesToRemove {
p.removeTable(tableID)
}
p.statusModRevision = newModRevision
p.status = newTaskStatus
// newModRevision == 0 means status is not updated
if newModRevision > 0 {
p.statusModRevision = newModRevision
p.status = newTaskStatus
}
syncTableNumGauge.
WithLabelValues(p.changefeedID, p.captureInfo.AdvertiseAddr).
Set(float64(len(p.status.Tables)))
Expand Down

0 comments on commit be7b835

Please sign in to comment.