Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: qupeng <qupeng@pingcap.com>
  • Loading branch information
hicqu committed Sep 6, 2023
1 parent bd44ce3 commit a7935b2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cdc/processor/sinkmanager/table_sink_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ func (w *sinkWorker) handleTask(ctx context.Context, task *sinkTask) (finalErr e
if !callbackIsPerformed {
task.callback(pos)
callbackIsPerformed = true
} else {
panic("should never be performed twice")
}
}

Expand Down Expand Up @@ -202,9 +200,9 @@ func (w *sinkWorker) handleTask(ctx context.Context, task *sinkTask) (finalErr e
if err != nil {
return errors.Trace(err)
}
// We have drained all events from the cache, we can return directly.
// No need to get events from the source manager again.
if drained {
// If drained is true it means we have drained all events from the cache,
// we can return directly instead of get events from the source manager again.
performCallback(lowerBound.Prev())
return nil
}
Expand Down

0 comments on commit a7935b2

Please sign in to comment.