You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "hgeraldino (via GitHub)" <gi...@apache.org> on 2023/03/13 14:26:05 UTC
[GitHub] [kafka] hgeraldino opened a new pull request, #13386: Fix logging conditional
hgeraldino opened a new pull request, #13386:
URL: https://github.com/apache/kafka/pull/13386
This shouldn't be a controversial change: the `if` condition here is checking the wrong variable (`this.committableOffsets.isEmpty()` always evaluates to true because of L#216). I assume this bug went undetected because it's only used to log information around committable offsets.
Should I file a JIRA?
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] C0urante commented on a diff in pull request #13386: Fix logging conditional
Posted by "C0urante (via GitHub)" <gi...@apache.org>.
C0urante commented on code in PR #13386:
URL: https://github.com/apache/kafka/pull/13386#discussion_r1135813644
##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerSourceTask.java:
##########
@@ -216,7 +216,7 @@ public boolean commitOffsets() {
this.committableOffsets = CommittableOffsets.EMPTY;
}
- if (committableOffsets.isEmpty()) {
+ if (offsetsToCommit.isEmpty()) {
Review Comment:
Don't we need to update the logging in the `else` branch to use `offsetsToCommit` instead of `committableOffsets` as well?
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] C0urante merged pull request #13386: KAFKA-14809 Fix logging conditional on WorkerSourceTask
Posted by "C0urante (via GitHub)" <gi...@apache.org>.
C0urante merged PR #13386:
URL: https://github.com/apache/kafka/pull/13386
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] C0urante commented on pull request #13386: KAFKA-14809 Fix logging conditional on WorkerSourceTask
Posted by "C0urante (via GitHub)" <gi...@apache.org>.
C0urante commented on PR #13386:
URL: https://github.com/apache/kafka/pull/13386#issuecomment-1471890863
Thanks @hgeraldino, I've merged and backported as far back as applicable.
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] hgeraldino commented on a diff in pull request #13386: Fix logging conditional
Posted by "hgeraldino (via GitHub)" <gi...@apache.org>.
hgeraldino commented on code in PR #13386:
URL: https://github.com/apache/kafka/pull/13386#discussion_r1135857544
##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerSourceTask.java:
##########
@@ -216,7 +216,7 @@ public boolean commitOffsets() {
this.committableOffsets = CommittableOffsets.EMPTY;
}
- if (committableOffsets.isEmpty()) {
+ if (offsetsToCommit.isEmpty()) {
Review Comment:
Yeah this is embarrassing :(
Fixed
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] C0urante commented on a diff in pull request #13386: Fix logging conditional
Posted by "C0urante (via GitHub)" <gi...@apache.org>.
C0urante commented on code in PR #13386:
URL: https://github.com/apache/kafka/pull/13386#discussion_r1136051929
##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerSourceTask.java:
##########
@@ -216,7 +216,7 @@ public boolean commitOffsets() {
this.committableOffsets = CommittableOffsets.EMPTY;
}
- if (committableOffsets.isEmpty()) {
+ if (offsetsToCommit.isEmpty()) {
Review Comment:
Haha, no worries! Considering I wrote this buggy logic in the first place I'm at least equally embarrassed here 😅
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] hgeraldino commented on pull request #13386: KAFKA-14809 Fix logging conditional on WorkerSourceTask
Posted by "hgeraldino (via GitHub)" <gi...@apache.org>.
hgeraldino commented on PR #13386:
URL: https://github.com/apache/kafka/pull/13386#issuecomment-1468755316
> LGTM, thanks @hgeraldino!
>
> It would be nice to have a Jira for this so that others who notice the logging issue on older versions can know 1) that it is a bug and 2) which versions it is fixed on. Would you mind filing a ticket and linking it to this PR in the title? We can merge after that.
Done
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] hgeraldino commented on a diff in pull request #13386: Fix logging conditional
Posted by "hgeraldino (via GitHub)" <gi...@apache.org>.
hgeraldino commented on code in PR #13386:
URL: https://github.com/apache/kafka/pull/13386#discussion_r1135857544
##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerSourceTask.java:
##########
@@ -216,7 +216,7 @@ public boolean commitOffsets() {
this.committableOffsets = CommittableOffsets.EMPTY;
}
- if (committableOffsets.isEmpty()) {
+ if (offsetsToCommit.isEmpty()) {
Review Comment:
Yeah this is embarrassing 🤦
Fixed
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org