You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Shekharrajak (via GitHub)" <gi...@apache.org> on 2026/06/29 17:32:19 UTC
[PR] KAFKA-20738: Producer 2PC InitProducerId request must negotiate v6 [kafka]
Shekharrajak opened a new pull request, #22703:
URL: https://github.com/apache/kafka/pull/22703
Ref https://issues.apache.org/jira/browse/KAFKA-20738
A producer with transaction.two.phase.commit.enable=true fails initTransactions() with UnsupportedVersionException: Attempted to write a non-default enable2Pc at version 5.
Root cause: v6 is latestVersionUnstable, the builder caps latestAllowedVersion at 5, so NetworkClient can never negotiate v6.
Fix: When enable2Pc or keepPreparedTxn is set, the builder allows the unstable last version (v6) so v6 is negotiated against a capable broker. Plain producers are unaffected (still capped at v5). build() now throws a clear UnsupportedVersionException if the negotiated version is < 6 while a 2PC field is set, instead of leaking the serialization-internals message.
Tests: Added InitProducerIdRequestTest covering latestAllowedVersion == 6 when enable2Pc/keepPreparedTxn is set, and the v5 cap for non-2PC requests.
Note: this is the client-side half; broker-side keepPreparedTxn recovery is tracked in KAFKA-20739.
--
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-20738: Producer 2PC InitProducerId request must negotiate v6 [kafka]
Posted by "Shekharrajak (via GitHub)" <gi...@apache.org>.
Shekharrajak commented on PR #22703:
URL: https://github.com/apache/kafka/pull/22703#issuecomment-4835630798
Ref https://github.com/apache/kafka/pull/22704
--
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-20738: Producer 2PC InitProducerId request must negotiate v6 [kafka]
Posted by "Shekharrajak (via GitHub)" <gi...@apache.org>.
Shekharrajak closed pull request #22703: KAFKA-20738: Producer 2PC InitProducerId request must negotiate v6
URL: https://github.com/apache/kafka/pull/22703
--
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-20738: Producer 2PC InitProducerId request must negotiate v6 [kafka]
Posted by "Shekharrajak (via GitHub)" <gi...@apache.org>.
Shekharrajak commented on PR #22703:
URL: https://github.com/apache/kafka/pull/22703#issuecomment-4845739231
> I don't think this is a problem that needs a fix. It's a reflection of the partial implementation of KIP-939. The latest RPC version is marked as unstable so that production clusters do not accidentally support 2PC.
Thanks @AndrewJSchofield for checking. Let me follow it closely https://issues.apache.org/jira/browse/KAFKA-15370
--
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-20738: Producer 2PC InitProducerId request must negotiate v6 [kafka]
Posted by "AndrewJSchofield (via GitHub)" <gi...@apache.org>.
AndrewJSchofield commented on PR #22703:
URL: https://github.com/apache/kafka/pull/22703#issuecomment-5089322463
@Shekharrajak I think this PR can probably be closed.
--
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