mirror of https://github.com/apache/activemq.git
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@667752 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
35706757e2
commit
2e4c688cdc
|
@ -95,7 +95,7 @@ public class AMQPersistenceAdapter implements PersistenceAdapter, UsageListener,
|
|||
private TaskRunnerFactory taskRunnerFactory;
|
||||
private WireFormat wireFormat = new OpenWireFormat();
|
||||
private SystemUsage usageManager;
|
||||
private long checkpointInterval = 1000 * 60;
|
||||
private long checkpointInterval = 1000 * 20;
|
||||
private int maxCheckpointMessageAddSize = 1024 * 4;
|
||||
private AMQTransactionStore transactionStore = new AMQTransactionStore(this);
|
||||
private TaskRunner checkpointTask;
|
||||
|
@ -375,12 +375,13 @@ public class AMQPersistenceAdapter implements PersistenceAdapter, UsageListener,
|
|||
LOG.debug("Checkpoint started.");
|
||||
}
|
||||
|
||||
Location newMark = null;
|
||||
Location currentMark = asyncDataManager.getMark();
|
||||
Location newMark = currentMark;
|
||||
Iterator<AMQMessageStore> queueIterator = queues.values().iterator();
|
||||
while (queueIterator.hasNext()) {
|
||||
final AMQMessageStore ms = queueIterator.next();
|
||||
Location mark = (Location)ms.getMark();
|
||||
if (mark != null && (newMark == null || newMark.compareTo(mark) < 0)) {
|
||||
if (mark != null && (newMark == null || mark.compareTo(newMark) > 0)) {
|
||||
newMark = mark;
|
||||
}
|
||||
}
|
||||
|
@ -388,12 +389,12 @@ public class AMQPersistenceAdapter implements PersistenceAdapter, UsageListener,
|
|||
while (topicIterator.hasNext()) {
|
||||
final AMQTopicMessageStore ms = topicIterator.next();
|
||||
Location mark = (Location)ms.getMark();
|
||||
if (mark != null && (newMark == null || newMark.compareTo(mark) < 0)) {
|
||||
if (mark != null && (newMark == null || mark.compareTo(newMark) > 0)) {
|
||||
newMark = mark;
|
||||
}
|
||||
}
|
||||
try {
|
||||
if (newMark != null) {
|
||||
if (newMark != currentMark) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Marking journal at: " + newMark);
|
||||
}
|
||||
|
|
|
@ -142,10 +142,10 @@ public class KahaTopicReferenceStore extends KahaReferenceStore implements Topic
|
|||
if (container != null) {
|
||||
ConsumerMessageRef ref = null;
|
||||
if((ref = container.remove(messageId)) != null) {
|
||||
TopicSubAck tsa = ackContainer.get(ref.getAckEntry());
|
||||
StoreEntry entry = ref.getAckEntry();
|
||||
TopicSubAck tsa = ackContainer.get(entry);
|
||||
if (tsa != null) {
|
||||
if (tsa.decrementCount() <= 0) {
|
||||
StoreEntry entry = ref.getAckEntry();
|
||||
entry = ackContainer.refresh(entry);
|
||||
ackContainer.remove(entry);
|
||||
ReferenceRecord rr = messageContainer.get(messageId);
|
||||
|
@ -156,6 +156,8 @@ public class KahaTopicReferenceStore extends KahaReferenceStore implements Topic
|
|||
removeInterest(rr);
|
||||
removeMessage = true;
|
||||
}
|
||||
}else {
|
||||
ackContainer.update(entry,tsa);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
|
|
Loading…
Reference in New Issue