-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Transactional commit mode system improvements and docs (#355)
* Transactional commit mode system improvements and docs (#355) ** Clarifies transaction system with much better documentation. ** Fixes a potential race condition which could cause offset leaks between transactions boundaries. ** Introduces lock acquisition timeouts. ** Fixes a potential issue with removing records from the retry queue incorrectly, by having an inconsistency between compareTo and equals in the retry TreeMap. Details: * Fix potential race condition with tx committing and work being available by expanding locking scope Don't finish producing with lock until work as been put into work inbox so that controller can process it before arranging commits. Aquire the commit lock earlier, so that no more records are able to be sent between process results and committing transaction. Otherwise a record from a future commit coule be added to this transaction, without its source offsets being collected for commit due to the work's status not being completed (as it hasn't been processed by the controller yet). * Too many messages were being produced at a certain times, making the test unreliable. Changed system to add only minimum amount needed, by calculating via bytes required to add to payload. * eliminate race condition by waiting for commit lock to be fully released before trying to acquire * refactor: Refactoring split ProducerManager out to ProducerWrapper (#399) * Remove sync lock on producer wrapper for committing transactions - shouldn't be needed anymore with the more robust produce lock - as that blocks producer access while committing instead of relying on sync locks * Create single point for integration commit assertions * Fixed an issue where a WC may not get removed from the retry queue due to inconsistency between equals and compareTo in TreeMap * Turn off forced transaction commit mode for vertx test - can't see why it had been done
- Loading branch information
Showing
60 changed files
with
2,466 additions
and
439 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Oops, something went wrong.