You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "YutaLin (via GitHub)" <gi...@apache.org> on 2026/01/07 17:15:57 UTC
[PR] KAFKA-20031: RPCProducerIdManager#sanityCheckResponse fails to detect overlapping producer id [kafka]
YutaLin opened a new pull request, #21266:
URL: https://github.com/apache/kafka/pull/21266
We may get a duplicate producer id if the producer ID at the start of the response is the same as last producer ID in the current block, so we make sanity check more robust.
Reviewers: Chia-Ping Tsai [chia7712@gmail.com](mailto:chia7712@gmail.com)
--
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
Re: [PR] KAFKA-20031: RPCProducerIdManager#sanityCheckResponse fails to detect overlapping producer id [kafka]
Posted by "YutaLin (via GitHub)" <gi...@apache.org>.
YutaLin commented on code in PR #21266:
URL: https://github.com/apache/kafka/pull/21266#discussion_r2674439202
##########
transaction-coordinator/src/main/java/org/apache/kafka/coordinator/transaction/RPCProducerIdManager.java:
##########
@@ -188,7 +188,7 @@ protected void handleAllocateProducerIdsResponse(ClientResponse clientResponse)
}
private boolean sanityCheckResponse(AllocateProducerIdsResponseData data) {
- if (data.producerIdStart() < currentProducerIdBlock.get().lastProducerId()) {
+ if (data.producerIdStart() <= currentProducerIdBlock.get().lastProducerId()) {
Review Comment:
Hi @chia7712, that's a great suggestion! I've made the change, I hope ci god is happy now.
##########
transaction-coordinator/src/main/java/org/apache/kafka/coordinator/transaction/RPCProducerIdManager.java:
##########
@@ -188,7 +188,7 @@ protected void handleAllocateProducerIdsResponse(ClientResponse clientResponse)
}
private boolean sanityCheckResponse(AllocateProducerIdsResponseData data) {
- if (data.producerIdStart() < currentProducerIdBlock.get().lastProducerId()) {
+ if (data.producerIdStart() <= currentProducerIdBlock.get().lastProducerId()) {
Review Comment:
Hi @chia7712, that's a great suggestion! I've made the change, I hope CI god is happy now.
--
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
Re: [PR] KAFKA-20031: RPCProducerIdManager#sanityCheckResponse fails to detect overlapping producer id [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #21266:
URL: https://github.com/apache/kafka/pull/21266#discussion_r2673096386
##########
transaction-coordinator/src/main/java/org/apache/kafka/coordinator/transaction/RPCProducerIdManager.java:
##########
@@ -188,7 +188,7 @@ protected void handleAllocateProducerIdsResponse(ClientResponse clientResponse)
}
private boolean sanityCheckResponse(AllocateProducerIdsResponseData data) {
- if (data.producerIdStart() < currentProducerIdBlock.get().lastProducerId()) {
+ if (data.producerIdStart() <= currentProducerIdBlock.get().lastProducerId()) {
Review Comment:
@YutaLin thanks for this fix, but could we add a test to make CI gods happy?
--
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
Re: [PR] KAFKA-20031: RPCProducerIdManager#sanityCheckResponse fails to detect overlapping producer id [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 merged PR #21266:
URL: https://github.com/apache/kafka/pull/21266
--
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