Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 96BDF87FE for ; Fri, 26 Aug 2011 15:28:54 +0000 (UTC) Received: (qmail 35037 invoked by uid 500); 26 Aug 2011 15:28:54 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 35012 invoked by uid 500); 26 Aug 2011 15:28:53 -0000 Mailing-List: contact dev-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 dev@activemq.apache.org Received: (qmail 35004 invoked by uid 99); 26 Aug 2011 15:28:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Aug 2011 15:28:53 +0000 X-ASF-Spam-Status: No, hits=-2000.9 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Aug 2011 15:28:50 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id E3D31D0BA4 for ; Fri, 26 Aug 2011 15:28:29 +0000 (UTC) Date: Fri, 26 Aug 2011 15:28:29 +0000 (UTC) From: "Gary Tully (JIRA)" To: dev@activemq.apache.org Message-ID: <1185529411.17789.1314372509929.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (AMQ-2868) NegativeQueueTest and JDBC variant - intermittent failure - missing message when cache exhausted MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AMQ-2868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13091824#comment-13091824 ] Gary Tully commented on AMQ-2868: --------------------------------- think setBatch needs to take the sync hit as it is the rare event. It may need to wait till store and cursor are in sync. > NegativeQueueTest and JDBC variant - intermittent failure - missing message when cache exhausted > ------------------------------------------------------------------------------------------------ > > Key: AMQ-2868 > URL: https://issues.apache.org/jira/browse/AMQ-2868 > Project: ActiveMQ > Issue Type: Bug > Affects Versions: 5.4.0 > Reporter: Gary Tully > Assignee: Gary Tully > Fix For: 5.4.1 > > > Test fails trying to consume all messages and misses one message on occasion. > Problem, concurrent transaction completion leaves messages out of order in the cursor w.r.t to the store. When the cursor is exhausted, the cache memory limit is reached and subsequent messages are not cached so the next message needs to be recovered from the store, the point at which we start reading from the store is important. If, at the point at which the cache is full, the cursor is out of order, it can skip a message in the store. > Previously, the entire store was replayed, as if it was never cached and these messages are suppressed by the cursor as duplicates, but there is a size limit and producers spread limit on the duplicate suppression that means messages can avoid duplicate detection. Also, in the case of consumer transactions that rollback, duplicate delivery is required so out of order messages may arrive on a subsequent dispatch. > setBatch, ensuring that messages are replayed form the correct point in the store is important to give ordering guarantees with failover and memory limits, so synchronization of the store and cursor w.r.t concurrent transactions is also needed in support of setBatch. > Store commit and the after completions that update the cursor need to be serialized for a destination to keep make this totally deterministic. > recap, memory limits such that a cache will be filled, concurrent send transaction completion so that store updates and cursor updated can overlap with each other and with cache invalidation. setBatch trying to reduce the replay of messages. > Outstanding question: > - do we make the use of setBatch and transaction sync with store and cursor configurable. If setBatch is off, don't sync. Then at the mercy of consumer transactions and duplicate suppression in the event of failover. An alternative is to make the sync conditional on the use of the cache for a destination. Very reliable but slow; slow is a very relative determination! > Also, may need to be disabled for all destinations as a transaction can span many destinations. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira