Repository navigation
Conversation
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.
PostOfficeImpl.checkNotBridgeDuplicateIDchecked each send againstcache.containsonly. In a client transaction the id is not in the cache yet:addToCache(duplID, tx, false)adds it after the commit, so that a client resending a transaction after a failure is not rejected. A second send of the same id in the same transaction therefore passed the check too, and the commit delivered both messages (and added the id to the cache twice, see ARTEMIS-6361).The ids a transaction sends are now kept in the transaction, by cache, and a send whose id the transaction already sent is a duplicate: the transaction is marked rollback-only, as for an id already in the cache. Other transactions do not see them, so a resent transaction is still accepted.
DuplicateDetectionTest.testSameIdTwiceInOneTransactionsends two messages with the same id in one transaction, expects the commit to fail withActiveMQDuplicateIdExceptionand no message to arrive, then sends the id in a new transaction and gets it. It fails without the fix.https://issues.apache.org/jira/browse/ARTEMIS-6360