Ensure that the orderIndex is reset to a good state. 

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1303128 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2012-03-20 20:10:59 +00:00
parent 1419103c18
commit 3cea40d889
1 changed files with 9 additions and 0 deletions

View File

@ -1333,6 +1333,7 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe
if (sd.subscriptions.isEmpty(tx)) {
sd.messageIdIndex.clear(tx);
sd.locationIndex.clear(tx);
sd.orderIndex.clear(tx);
}
}
}
@ -2541,6 +2542,14 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe
}
}
void clear(Transaction tx) throws IOException {
this.remove(tx);
this.resetCursorPosition();
this.allocate(tx);
this.load(tx);
this.configureLast(tx);
}
void remove(Transaction tx) throws IOException {
defaultPriorityIndex.clear(tx);
defaultPriorityIndex.unload(tx);