You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2021/04/16 10:12:27 UTC

[GitHub] [activemq-artemis] gtully commented on a change in pull request #3541: ARTEMIS-3240 - ensure acked messages in transactions are returned to …

gtully commented on a change in pull request #3541:
URL: https://github.com/apache/activemq-artemis/pull/3541#discussion_r614725506



##########
File path: artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
##########
@@ -698,6 +700,21 @@ public void fail(ActiveMQException me, String message) {
       shutdown(true);
    }
 
+   private void returnReferencesFromAnyPendingLocalTransactions() {
+      for (Transaction tx : txMap.values()) {
+         final AMQSession amqSession = (AMQSession) tx.getProtocolData();
+         if (amqSession != null) {
+            amqSession.getCoreSession().resetTX(tx);
+            try {
+               commandProcessorInstance.returnReferences(tx, amqSession);

Review comment:
       nice, that is simpler, I found rollbackIfPossible that will ignore pending xa. It fixes the issue. thanks. Will push an update with the change in a bit.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org