Fixing potential NPE when calling updateMessage on a Queue store in
KahaDB if subscription statistics are enabled. Also reduced the
visibily from public to protected to subscription statistic related
methods that shouldn't be public and added null pointer checks there as
well.
https://issues.apache.org/jira/browse/AMQ-6642
(cherry picked from commit 2731f04f1c)
Switching MessageDatabase to store JournalSyncStrategy as its enum value
instead of String to avoid the performance penalty of comparing Strings
everytime isEnableJournalDiskSyncs() is called which currently happens
on every write.
(cherry picked from commit 0d824a8e68)
Fix KahaDB index free page recovery on unclean shutdown so that existing
free pages will be tracked and not lost.
(cherry picked from commit 38d85be476)
On journal start use lastFileLength instead of maxFileLength when
checking for unused space in the last journal file as it is possible the
length of the last journal file is not the same length as maxFileLength
(cherry picked from commit 0ad62f722f)
Fixing a thread safety issue with memoryUsage when using concurrentStoreAndDispatch
that was causing memory usage to get out of sync.
The InnerFutureTask class inside KahaDB was not thread safe which was
the root cause of the problem.
(cherry picked from commit 0f0bdb21ef)
The temporary store will now delete the old temp directory on start up
if lazyInit is true instead of waiting for the store to initialize to
clear up space. This prevents space on the disk from being wasted with
old data if the temp store isn't initialized
(cherry picked from commit a82c95cd29)
Modifying patch so that only stores that persist the noLocal flag will
check if this flag has changed to prevent a subscription from being
deleted by mistake
(cherry picked from commit 18571ce09b)
Fixing test so that test DataFile is written to a temporary directory
instead of the main activemq-kahadb-store directory. This prevents git
from picking up the test file
Reworking patch so that a periodic disk sync uses a journal trace
command to trigger the sync so that everything is done in the same
thread for the writes
Adding non-blocking metrics to KahaDB to track message counts and sizes
for subscriptions. Turned off by default but can be enabled on the
KahaDBPersistenceAdapter
Fixing store size calculation on KahaUpdateMessageCommand processing so
that the size won't increase inadvertently if the existing location of
the command in the journal is the same as the new location
Fixing PList size tracking by moving the null assignment on removal to
after the onRemoval method is called to make sure that the decrement is
done properly.