-
Notifications
You must be signed in to change notification settings - Fork 589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v23.1.x] Fix txn consume group issues leading to undefined behavior #12006
[v23.1.x] Fix txn consume group issues leading to undefined behavior #12006
Commits on Jun 9, 2023
-
txn: fix incorrect log messages
(cherry picked from commit 7debd01)
Configuration menu - View commit details
-
Copy full SHA for 6250ee9 - Browse repository at this point
Copy the full SHA 6250ee9View commit details -
txn: update abort_old_txes to use locks
An execution of abort_old_txes could span multiple terms so the so the method could modify new state assuming it's the old state resulting in undefined behavior (cherry picked from commit f7fc026)
Configuration menu - View commit details
-
Copy full SHA for a1aa4bd - Browse repository at this point
Copy the full SHA a1aa4bdView commit details -
Make group accept term to reduce scope of where reset_tx_state is used to easier track where the write lock is necessary (cherry picked from commit 93297d5)
Configuration menu - View commit details
-
Copy full SHA for 3fe916a - Browse repository at this point
Copy the full SHA 3fe916aView commit details
Commits on Jul 10, 2023
-
txn: completely reset group state on term change
When the consumer group log's term change we replay the whole log to reconstruct the state. We used to merge current and the replayed state but it's error prone. Reseting the whole txn state to have more deter- ministic behavior (cherry picked from commit 69c5392)
Configuration menu - View commit details
-
Copy full SHA for f68ff7b - Browse repository at this point
Copy the full SHA f68ff7bView commit details -
txn: step down on begin_tx & store_txn_offsets failures
Transactions in kafka protocol are stateful: the processing of the requests depends on the previous commands executed by the same or even different producer. It makes the situations when the replica- tion fails with the indecisive errors such as timeout dangerous because the true state is unknown. Stepping down to resolve uncertainty by replaying the log (cherry picked from commit 7ca5707)
Configuration menu - View commit details
-
Copy full SHA for adaadce - Browse repository at this point
Copy the full SHA adaadceView commit details -
Revert "txn: update abort_old_txes to use locks"
Fixes: - redpanda-data#11372 - redpanda-data#11452 - redpanda-data#11344 This reverts commit f7fc026. (cherry picked from commit 6d86fc8)
Configuration menu - View commit details
-
Copy full SHA for f5b2017 - Browse repository at this point
Copy the full SHA f5b2017View commit details -
utils: add units-based attempt-lock interface to rwlock
(cherry picked from commit 0dabdff)
Configuration menu - View commit details
-
Copy full SHA for f8a398c - Browse repository at this point
Copy the full SHA f8a398cView commit details -
Configuration menu - View commit details
-
Copy full SHA for f8865d4 - Browse repository at this point
Copy the full SHA f8865d4View commit details -
txn: update abort_old_txes to use locks
An execution of abort_old_txes could span multiple terms so the so the method could modify new state assuming it's the old state resulting in undefined behavior. This commit is the rewrite of the reverted f7fc026 in 11474. The pro- blem was caused by: - do_detach_partition got blocked - RP ignored blocked do_detach_partition and attempted next op leading double registration of the consumer groups ntp The op was blocked by a deadlock: - do_abort_old_txes was waiting for read lock while holding _gate - do_detach_partition was holding write lock while waiting to the gate to be closed This version doesn't wait for the read lock to become available and exit do_abort_old_txes releasing the _gate. It still isn't clear why RP ignored a blocked op (cherry picked from commit 0b9b9fb)
Configuration menu - View commit details
-
Copy full SHA for 15f575f - Browse repository at this point
Copy the full SHA 15f575fView commit details