-
-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kgo: EndAndBeginTransaction w/ EndBeginTxnUnsafe: fix three issues
- Depending on timing and logic races, EndTxn could encounter INVALID_TXN_STATE. We now ignore this error in the one place we expect to potentially encounter it, and have a long doc on why we ignore it. The issue is expected to be rare and has only been encountered by forcing pathological request processing with sleeps. - We now ensure we set addedToTxn once promises are called. Previously, we would set before promises are called. If a user was using these promises to know if they needed to commit, they previously could have committed before everything was promised and never committed again. This would only affect a user on shutdown if they were not careful. - We now ensure a final commit will be issued if we ever readd partitions to a transaction. Previously, if we added partitions but stopped producing, we would not commit when ending again and the transaction would timeout and our txnal ID would be fenced. Now, we set that we have readded and ensure we commit.
- Loading branch information
Showing
3 changed files
with
75 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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