Repository navigation
fix: transition idempotent producer to UNINITIALIZED in reset_producer_id (#3181) - #3182
Merged
dpkp merged 1 commit intoNov 4, 2026
Merged
Conversation
|
I took a look at the above. Here is what was done: applied proposed change to 3.0.12 the outage test in #3181 recovered (5 of 5 messages delivered with a new producer ID) |
Owner
|
Thanks! |
dpkp
pushed a commit
that referenced
this pull request
Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3181
Root Cause
Since
init_producer_id()was updated to drive non-transactional idempotent producers throughUNINITIALIZED -> INITIALIZING -> READY, callingreset_producer_id()(when an in-retry batch expires or a pre-KIP-360 sequence error requires a producer ID reset) clearedproducer_id_and_epochto(-1, -1)while leaving_current_stateatTransactionState.READY. On subsequent sender iterations,init_producer_id()returned early because_current_state != TransactionState.UNINITIALIZED, leaving the producer without a valid producer ID indefinitely.Changes
TransactionStatetransitions toUNINITIALIZEDfromUNINITIALIZEDandREADYinTransactionState.is_transition_valid._current_stateback toTransactionState.UNINITIALIZEDinTransactionManager.reset_producer_id()so the nextinit_producer_id()call requests a fresh producer ID and epoch from the broker.test_idempotent_producer_init_then_reset_then_reinitintest/producer/test_transaction_manager_mock_broker.pyverifying the fullinit -> READY -> reset -> UNINITIALIZED -> re-init -> READYcycle.Test Evidence
pytest test/producer/test_transaction_manager.py test/producer/test_sender.py test/producer/test_transaction_manager_mock_broker.py test/producer/test_producer.py(255 passed)Prepared with AI assistance (OpenCode), reviewed for correctness before submission.