[AMQ-6644] - ensure journal files past last update are not included in the logged gc set in error

This commit is contained in:
gtully 2017-04-04 12:21:31 +01:00 committed by Christopher L. Shannon (cshannon)
parent b8a7aa80e5
commit 0bbb82e7e5

View File

@ -1733,7 +1733,8 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe
}
if (lastUpdate != null) {
gcCandidateSet.remove(lastUpdate.getDataFileId());
// we won't delete past the last update, ackCompaction journal can be a candidate in error
gcCandidateSet.removeAll(new TreeSet<Integer>(gcCandidateSet.tailSet(lastUpdate.getDataFileId())));
}
// Don't GC files under replication