chia7712 commented on code in PR #15999:
URL: https://github.com/apache/kafka/pull/15999#discussion_r1607152637
##########
connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorSourceTask.java:
##########
@@ -112,12 +115,15 @@ public void start(Map<String, String> props) {
@Override
public void commit() {
- // Offset syncs which were not emitted immediately due to their offset
spacing should be sent periodically
- // This ensures that low-volume topics aren't left with persistent lag
at the end of the topic
- promoteDelayedOffsetSyncs();
- // Publish any offset syncs that we've queued up, but have not yet
been able to publish
- // (likely because we previously reached our limit for number of
outstanding syncs)
- firePendingOffsetSyncs();
+ // Handle delayed and pending offset syncs only when
emit.offset-syncs.enabled set to true
+ if (emitOffsetSyncEnabled) {
+ // Offset syncs which were not emitted immediately due to their
offset spacing should be sent periodically
+ // This ensures that low-volume topics aren't left with persistent
lag at the end of the topic
+ promoteDelayedOffsetSyncs();
+ // Publish any offset syncs that we've queued up, but have not yet
been able to publish
+ // (likely because we previously reached our limit for number of
outstanding syncs)
+ firePendingOffsetSyncs();
Review Comment:
We don't need to create `offsetProducer` if `emitOffsetSyncEnabled` is false
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]