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 0f0bdb21ef97c39ec7d54d164e07921611c1de08)
Round the start time value not truncate to ensure delay falls on the
correct side of the scheduling block.
(cherry picked from commit 980162233fd3693d1f83d3f95985ac33affa7a8f)
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 a82c95cd29a6b06d2083b1869129b9e2addac7da)
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 18571ce09b6385d8560200928a353e9da1a1ffe4)
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.
The ack compaction task now acquires the checkpoint lock while it runs
to prevent a checkpoint from running at the same time unintentionally.
Also, getJournalLocation is now protected by a try/catch to handle
errors.
Properly nulling out the scheduler service in MessageDatabase after it
is shutdown on a store close so that if the store is restarted the
thread will properly restart.
Properly nulling out the scheduler service in MessageDatabase after it
is shutdown on a store close so that if the store is restarted the thread will
properly restart.
Moving beforeMarshall back to the store implementations because we don't
want all store implementations to marshall (such as memory store)
This reverts commit b9b98a45cee484b112dadeffa2d9a874c4ffe280.
Calling beforeMarshall on messages when they async stored before the
store task is run and before consumer dispatch to prevent two threads
from trying to mutate the message state at the same time.