Return-Path: X-Original-To: apmail-activemq-issues-archive@minotaur.apache.org Delivered-To: apmail-activemq-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2FA9718D7F for ; Thu, 2 Jul 2015 04:58:05 +0000 (UTC) Received: (qmail 13716 invoked by uid 500); 2 Jul 2015 04:58:05 -0000 Delivered-To: apmail-activemq-issues-archive@activemq.apache.org Received: (qmail 13684 invoked by uid 500); 2 Jul 2015 04:58:05 -0000 Mailing-List: contact issues-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list issues@activemq.apache.org Received: (qmail 13674 invoked by uid 99); 2 Jul 2015 04:58:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jul 2015 04:58:05 +0000 Date: Thu, 2 Jul 2015 04:58:05 +0000 (UTC) From: "Jose Alvarado (JIRA)" To: issues@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMQNET-503) DTC Transactions do not respect rollbacks consistently leading to duplicated messages MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMQNET-503?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jose Alvarado updated AMQNET-503: --------------------------------- Attachment: Apache Documentation.docx Apache.NMS.AMQNETIssue.patch Apache.NMS.ActiveMQ.AMQNETIssue.patch This is the patch and the test plan document > DTC Transactions do not respect rollbacks consistently leading to duplicated messages > ------------------------------------------------------------------------------------- > > Key: AMQNET-503 > URL: https://issues.apache.org/jira/browse/AMQNET-503 > Project: ActiveMQ .Net > Issue Type: Bug > Components: ActiveMQ > Reporter: Jose Alvarado > Assignee: Jim Gomes > Attachments: Apache Documentation.docx, Apache.NMS.AMQNETIssue.patch, Apache.NMS.ActiveMQ.AMQNETIssue.patch > > > In certain circumstances, rollback does not work properly, as a result duplicate messages are generated from normal DTC operations. The circumstances under which this issues occurs are: > - DTC transaction initiated, but fails to commit; > - Another DTC transaction initiated and successfully commits; > - When a transaction is roll backed and committed on retry; > As a result the number of messages sent is larger to the number of messages received by the target broker. Some of the messages are not roll backed when it fails and they get sent again when committed on retry. > This issue has been raised in Jira as issues 413 and 472: > https://issues.apache.org/jira/browse/AMQNET-413 > https://issues.apache.org/jira/browse/AMQNET-472 > Analysing the code we realised that these two issues above are similar, and they have the same cause. We have therefore developed a patch based on feedback and unit tests provided by those two issues, where we fix the problem and we pass all existing unit tests. The changes modify only code related to DTC, and it was developed in .NET 2.0 as per the requirements for 413/472 > The fix implements the solution suggested in the patch for issue 472 where some lock conditions were missing. In addition we have added a condition where we will not lock the transaction whenever a distributed transaction occurs. The DtcWaitHandle.WaitOne causes DTC transactions involving a database or XA transaction to fail unit testing. > The patch was extensively tested with over a 1000 messages (1K, 1.5K, 10K, 100K, 1M) using two brokers across different servers to guarantee distributed transactions. Testing also included different message sizes, infrastructure setup, databases, and message content verification to validate its integrity and ensure messages were not duplicated. -- This message was sent by Atlassian JIRA (v6.3.4#6332)