fix failing DbRestartJDBCQueueTest

This commit is contained in:
gtully 2014-12-15 14:17:21 +00:00
parent 2d9959a6f6
commit 13c207292f
1 changed files with 3 additions and 10 deletions

View File

@ -937,15 +937,8 @@ public class Queue extends BaseDestination implements Task, UsageListener, Index
@Override
public String toString() {
int size = 0;
messagesLock.readLock().lock();
try {
size = messages.size();
} finally {
messagesLock.readLock().unlock();
}
return destination.getQualifiedName() + ", subscriptions=" + consumers.size()
+ ", memory=" + memoryUsage.getPercentUsage() + "%, size=" + size + ", pending="
+ ", memory=" + memoryUsage.getPercentUsage() + "%, size=" + destinationStatistics.getMessages().getCount() + ", pending="
+ indexOrderedCursorUpdates.size();
}
@ -1720,7 +1713,6 @@ public class Queue extends BaseDestination implements Task, UsageListener, Index
protected void removeMessage(ConnectionContext context, Subscription sub, final QueueMessageReference reference,
MessageAck ack) throws IOException {
LOG.trace("ack of {} with {}", reference.getMessageId(), ack);
reference.setAcked(true);
// This sends the ack the the journal..
if (!ack.isInTransaction()) {
acknowledge(context, sub, ack, reference);
@ -1759,7 +1751,8 @@ public class Queue extends BaseDestination implements Task, UsageListener, Index
getDestinationStatistics().getForwards().increment();
}
}
// after successful store update
reference.setAcked(true);
}
private void dropMessage(QueueMessageReference reference) {