You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ce...@apache.org on 2023/03/16 12:40:28 UTC
[kafka] branch 3.4 updated: KAFKA-14809 Fix logging conditional on WorkerSourceTask (#13386)
This is an automated email from the ASF dual-hosted git repository.
cegerton pushed a commit to branch 3.4
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/3.4 by this push:
new a99c7fa44d8 KAFKA-14809 Fix logging conditional on WorkerSourceTask (#13386)
a99c7fa44d8 is described below
commit a99c7fa44d88eaf4ad5f8c4425e9a728f95f584a
Author: Hector Geraldino <hg...@gmail.com>
AuthorDate: Thu Mar 16 08:39:31 2023 -0400
KAFKA-14809 Fix logging conditional on WorkerSourceTask (#13386)
Reviewers: Chris Egerton <ch...@aiven.io>
---
.../org/apache/kafka/connect/runtime/WorkerSourceTask.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerSourceTask.java b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerSourceTask.java
index ba9600561a2..61a94209e66 100644
--- a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerSourceTask.java
+++ b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerSourceTask.java
@@ -216,7 +216,7 @@ class WorkerSourceTask extends AbstractWorkerSourceTask {
this.committableOffsets = CommittableOffsets.EMPTY;
}
- if (committableOffsets.isEmpty()) {
+ if (offsetsToCommit.isEmpty()) {
log.debug("{} Either no records were produced by the task since the last offset commit, "
+ "or every record has been filtered out by a transformation "
+ "or dropped due to transformation or conversion errors.",
@@ -225,15 +225,15 @@ class WorkerSourceTask extends AbstractWorkerSourceTask {
// We continue with the offset commit process here instead of simply returning immediately
// in order to invoke SourceTask::commit and record metrics for a successful offset commit
} else {
- log.info("{} Committing offsets for {} acknowledged messages", this, committableOffsets.numCommittableMessages());
- if (committableOffsets.hasPending()) {
+ log.info("{} Committing offsets for {} acknowledged messages", this, offsetsToCommit.numCommittableMessages());
+ if (offsetsToCommit.hasPending()) {
log.debug("{} There are currently {} pending messages spread across {} source partitions whose offsets will not be committed. "
+ "The source partition with the most pending messages is {}, with {} pending messages",
this,
- committableOffsets.numUncommittableMessages(),
- committableOffsets.numDeques(),
- committableOffsets.largestDequePartition(),
- committableOffsets.largestDequeSize()
+ offsetsToCommit.numUncommittableMessages(),
+ offsetsToCommit.numDeques(),
+ offsetsToCommit.largestDequePartition(),
+ offsetsToCommit.largestDequeSize()
);
} else {
log.debug("{} There are currently no pending messages for this offset commit; "