mirror of https://github.com/apache/activemq.git
fix failing DbRestartJDBCQueueTest
This commit is contained in:
parent
2d9959a6f6
commit
13c207292f
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue