Skip to content

Commit

Permalink
changefeed(ticdc): fix barrier ts set incorrectly cause monitor becom…
Browse files Browse the repository at this point in the history
…e year (#11560)

close #11553
  • Loading branch information
3AceShowHand authored Sep 3, 2024
1 parent b999807 commit 995ea76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cdc/owner/changefeed.go
Original file line number Diff line number Diff line change
Expand Up @@ -927,8 +927,6 @@ func (c *changefeed) handleBarrier(ctx context.Context,
barrier *schedulepb.BarrierWithMinTs,
) error {
barrierTp, barrierTs := c.barriers.Min()
c.metricsChangefeedBarrierTsGauge.Set(float64(oracle.ExtractPhysical(barrierTs)))

// It means:
// 1. All data before the barrierTs was sent to downstream.
// 2. No more data after barrierTs was sent to downstream.
Expand Down Expand Up @@ -970,6 +968,8 @@ func (c *changefeed) handleBarrier(ctx context.Context,
barrier.MinTableBarrierTs = barrierTs
}

// MinTableBarrierTs is always the next barrier that blocking the global resolvedTs.
c.metricsChangefeedBarrierTsGauge.Set(float64(oracle.ExtractPhysical(barrier.MinTableBarrierTs)))
return nil
}

Expand Down

0 comments on commit 995ea76

Please # to comment.