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 0457D10181 for ; Fri, 13 Feb 2015 18:32:12 +0000 (UTC) Received: (qmail 61912 invoked by uid 500); 13 Feb 2015 18:32:11 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 61847 invoked by uid 500); 13 Feb 2015 18:32:11 -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 61647 invoked by uid 99); 13 Feb 2015 18:32:11 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Feb 2015 18:32:11 +0000 Date: Fri, 13 Feb 2015 18:32:11 +0000 (UTC) From: "Arthur Naseef (JIRA)" To: dev@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMQ-5542) KahaDB data files containing acknowledgements are deleted during cleanup 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/AMQ-5542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arthur Naseef updated AMQ-5542: ------------------------------- Fix Version/s: 5.11.1 > KahaDB data files containing acknowledgements are deleted during cleanup > ------------------------------------------------------------------------ > > Key: AMQ-5542 > URL: https://issues.apache.org/jira/browse/AMQ-5542 > Project: ActiveMQ > Issue Type: Bug > Components: Message Store > Affects Versions: 5.10.0, 5.10.1 > Reporter: Sergiy Barlabanov > Assignee: Gary Tully > Fix For: 5.11.1, 5.12.0 > > Attachments: AMQ-5542.patch, AdjustedAMQ2832Test.patch > > > AMQ-2832 was not fixed cleanly. > The commit dd68c61e65f24b7dc498b36e34960a4bc46ded4b by Gary from 8.10.2010 introduced a problem by deleting too many files. > Scenarios we are facing currently in production: > Data file #1 contains unconsumed messages sitting in a DLQ. So this file is not a cleanup candidate. > The next file #2 contains acks of some messages from file #1. This file is not a cleanup candidate (because of ackMessageFileMap logic). > The next file #3 contains acks of some messages from file #2. And this file is deleted during the cleanup procedure. So on Broker restart all messages from #2, whose acks were from the deleted file #3, are replayed! > The reason is gcCandidates variable, which is a copy of gcCandidateSet (see MessageDatabase#checkpointUpdate at the end of the method - org/apache/activemq/store/kahadb/MessageDatabase.java:1659 on 5.10.0 tag). So when a candidate is deleted from gcCandidateSet (org/apache/activemq/store/kahadb/MessageDatabase.java:1668 on 5.10.0 tag), gcCandidates still contains that candidate and the comparison on org/apache/activemq/store/kahadb/MessageDatabase.java:1666 works wrong! > I will try to adjust AMQ2832Test. -- This message was sent by Atlassian JIRA (v6.3.4#6332)