Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into kafka-consumer-batch
Browse files Browse the repository at this point in the history
Signed-off-by: Ping Yu <[email protected]>
  • Loading branch information
pingyu committed Mar 4, 2024
2 parents acf0d83 + 40357a1 commit 02b5646
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cdc/cdc/sink/mq_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ func (s mqSinkSuite) TestFlushChangedEvents(c *check.C) {
err = sink.EmitChangedEvents(ctx, kv3)
c.Assert(err, check.IsNil)

// TODO: fix EmitCheckpointTs
// mock kafka broker processes 1 row resolvedTs event
// leader.Returns(prodSuccess)

checkpointTs1, err := sink.FlushChangedEvents(ctx, keyspanID1, kv1.CRTs)
c.Assert(err, check.IsNil)
c.Assert(checkpointTs1, check.Equals, kv1.CRTs)
Expand Down
2 changes: 1 addition & 1 deletion cdc/cdc/sink/producer/kafka/kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func (k *kafkaSaramaProducer) run(ctx context.Context) error {
if flushedOffset <= prevOffset {
log.Panic("kafka producer flushed offset goes backward", zap.Int32("partition", msg.Partition), zap.Uint64("flushed", flushedOffset), zap.Uint64("prev", prevOffset))
}
log.Debug("kafka producer flushed message", zap.Int32("partition", msg.Partition), zap.Uint64("offset", flushedOffset))
log.Debug("kafka producer flushed message", zap.Int32("partition", msg.Partition), zap.Uint64("offset", flushedOffset), zap.Uint64("prev", prevOffset))

k.flushedNotifier.Notify()
case err := <-k.asyncClient.Errors():
Expand Down

0 comments on commit 02b5646

Please sign in to comment.