activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhangleilmy <zhanglei...@yahoo.com.cn>
Subject AMQPersist may not delete some date file where messages already bean consumed.
Date Mon, 08 Sep 2008 08:31:42 GMT

1. In AMQMessageStore.java, this is a function(doAsyncWrite), I think there
should delete message in cpdeledMessageIds.entrySet(). 
I add code like this:
############################################################
Iterator<Entry<MessageId, ReferenceData>> iterator2 =
cpdeledMessageIds.entrySet().iterator();
                while (iterator2.hasNext()) {
                    Entry<MessageId, ReferenceData> entry =
iterator2.next();
                    try {
                       
AMQMessageStore.this.peristenceAdapter.removeInProgressDataFile(AMQMessageStore.this,entry.getValue().getFileId());
                    } catch (Throwable e) {
                        LOG.warn("Add by ZL Message could not be added to
long term store: " + e.getMessage(), e);
                    }
                }
#############################################################
before
#############################################################
persitanceAdapter.commitTransaction(context);
persitanceAdapter.beginTransaction(context);

// Checkpoint the removed messages.
                for (MessageAck ack : cpRemovedMessageLocations) {
                    try {
                       
referenceStore.removeMessage(transactionTemplate.getContext(), ack);
                    } catch (Throwable e) {
                        LOG.warn("Message could not be removed from long
term store: " + e.getMessage(), e);
                    }
                }
#############################################################


2. the index file getting bigger and bigger.
If message produced more and more but not bean comsumed, the index file will
become bigger. even after messages have bean consumed, next time when
messages were produced, the index file become more bigger. I think there are
some wrong in link structure.

In org.apache.activemq.kaha.impl.index.IndexManager 
In function freeIndex() createNewIndex(), I think may be where are something
wrong.


My english is poor, I don't know if I have expressed clearly.







-- 
View this message in context: http://www.nabble.com/AMQPersist-may-not-delete-some-date-file-where-messages-already-bean-consumed.-tp19367985p19367985.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Mime
View raw message