https://issues.apache.org/jira/browse/AMQ-3422 - don't remove journal file with current producer tracker

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1153482 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2011-08-03 13:35:35 +00:00
parent fa2b058dd5
commit 01ae0eaf92
1 changed files with 4 additions and 1 deletions

View File

@ -1178,12 +1178,15 @@ public class MessageDatabase extends ServiceSupport implements BrokerServiceAwar
gcCandidateSet.removeAll(journalFilesBeingReplicated);
}
if (metadata.producerSequenceIdTrackerLocation != null) {
gcCandidateSet.remove(metadata.producerSequenceIdTrackerLocation.getDataFileId());
}
// Don't GC files after the first in progress tx
if (metadata.firstInProgressTransactionLocation != null) {
if (metadata.firstInProgressTransactionLocation.getDataFileId() < firstTxLocation.getDataFileId()) {
firstTxLocation = metadata.firstInProgressTransactionLocation;
}
;
}
if (firstTxLocation != null) {