https://issues.apache.org/jira/browse/AMQ-3806 - Partial index updates can lead to bogus recovery for the vmcursor of a Q on startup. Only recovery destinations with that have some messages, so the location index is the system or reference. It makes sense as the location index is the basis for gc

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1325810 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2012-04-13 15:39:01 +00:00
parent 90fcbc8812
commit 8d2c079e0c
1 changed files with 1 additions and 1 deletions

View File

@ -364,7 +364,7 @@ public class Queue extends BaseDestination implements Task, UsageListener {
messages.setUseCache(isUseCache());
messages.setMemoryUsageHighWaterMark(getCursorMemoryHighWaterMark());
final int messageCount = store.getMessageCount();
if (messages.isRecoveryRequired()) {
if (messageCount > 0 && messages.isRecoveryRequired()) {
BatchMessageRecoveryListener listener = new BatchMessageRecoveryListener(messageCount);
do {
listener.reset();