[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
parent 8b064889c6
commit c1cbf509da
1 changed files with 2 additions and 1 deletions

View File

@ -1742,7 +1742,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