ActiveMQ
  1. ActiveMQ
  2. AMQ-4296

Unit tests fail intermittently when using LevelDB adapter

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.8.0
    • Fix Version/s: 5.9.0
    • Component/s: Test Cases
    • Labels:
      None

      Description

      A couple of the unit tests that have be modified to run with LevelDB as the persistence adapter fail intermittently.

      AMQ2870Test
      AMQ2584Test#testSize
      DuranleSubscriptionOfflineTest#testConsumeOnlyMatchedMessages
      LevelDBXARecoveryBrokerTest#testTopicPersistentPreparedAcksAvailableAfterRestartAndRollback

      1. AMQ-4415B.patch
        46 kB
        Kevin Earls

        Issue Links

          Activity

          Hide
          Timothy Bish added a comment -

          current set of test are passing for me now.

          Show
          Timothy Bish added a comment - current set of test are passing for me now.
          Hide
          Timothy Bish added a comment -

          QueueBrowsingLevelDBTest is failing because the LevelDB store isn't using the Message incrementReferenceCount and decrementReferenceCount methods as KahaDB does so first three messages get added to the cursors batch list befire the memory usage exceeds the set value. In the KahaDB versions of the test the usage exceeds the set value on send of the third message so it's not added to the Cursor's batch list and its usage drops after the store finishes its write so we can then page in one page worth of messages after the first two messages are sent to the browser.

          Show
          Timothy Bish added a comment - QueueBrowsingLevelDBTest is failing because the LevelDB store isn't using the Message incrementReferenceCount and decrementReferenceCount methods as KahaDB does so first three messages get added to the cursors batch list befire the memory usage exceeds the set value. In the KahaDB versions of the test the usage exceeds the set value on send of the third message so it's not added to the Cursor's batch list and its usage drops after the store finishes its write so we can then page in one page worth of messages after the first two messages are sent to the browser.
          Hide
          Timothy Bish added a comment -

          found out what was breaking the run of QueueMasterSlaveSingleUrlTest, fixed the clean settings to remove old test stores. Works now for me on Mac and Linux.

          Show
          Timothy Bish added a comment - found out what was breaking the run of QueueMasterSlaveSingleUrlTest, fixed the clean settings to remove old test stores. Works now for me on Mac and Linux.
          Hide
          Timothy Bish added a comment -

          Most look pretty good now, QueueMasterSlaveSingleUrlTest is still hanging though.

          Show
          Timothy Bish added a comment - Most look pretty good now, QueueMasterSlaveSingleUrlTest is still hanging though.
          Hide
          Hiram Chirino added a comment -

          The bug causing ThreeBrokerVirtualTopicNetwork to fail is now fixed.

          Show
          Hiram Chirino added a comment - The bug causing ThreeBrokerVirtualTopicNetwork to fail is now fixed.
          Hide
          Hiram Chirino added a comment -

          Implemented a pure LevelDB test for the StoreQueueCursorNoDuplicateTest and fix the bug that was causing it to fail.

          Show
          Hiram Chirino added a comment - Implemented a pure LevelDB test for the StoreQueueCursorNoDuplicateTest and fix the bug that was causing it to fail.
          Hide
          Hiram Chirino added a comment -

          Added a LevelDB version of AMQ2149Test.java. It's working now.

          Show
          Hiram Chirino added a comment - Added a LevelDB version of AMQ2149Test.java. It's working now.
          Hide
          Hiram Chirino added a comment -

          Have just committed a fix for LevelDBXARecoveryBrokerTest. The topic GC was being to agressive and was GC messages which had acks that were prepared but not committed.

          Show
          Hiram Chirino added a comment - Have just committed a fix for LevelDBXARecoveryBrokerTest. The topic GC was being to agressive and was GC messages which had acks that were prepared but not committed.
          Hide
          Hiram Chirino added a comment -

          Found a thread safety issue in the leveldb imp. Should now be fixed as of r1483369

          Show
          Hiram Chirino added a comment - Found a thread safety issue in the leveldb imp. Should now be fixed as of r1483369
          Hide
          Kevin Earls added a comment -

          And AMQ2580Test

          Show
          Kevin Earls added a comment - And AMQ2580Test
          Hide
          Kevin Earls added a comment -

          Also: QueueMasterSlaveSingleUrlTest

          Show
          Kevin Earls added a comment - Also: QueueMasterSlaveSingleUrlTest
          Hide
          Timothy Bish added a comment -

          Patch applied.

          Show
          Timothy Bish added a comment - Patch applied.
          Hide
          Kevin Earls added a comment -

          Could you apply this patch to FailoverTransactionTest? On AIX and Solaris when testFailoverCommitReplyLost is run with LevelDB it will hang.

          Show
          Kevin Earls added a comment - Could you apply this patch to FailoverTransactionTest? On AIX and Solaris when testFailoverCommitReplyLost is run with LevelDB it will hang.
          Hide
          Kevin Earls added a comment -

          Also, these cause issues at least on AIX and Solaris.

          AMQ2584Test
          AMQ2870Test
          QueueMbeanRestartTest
          FailoverTransactionTest
          ConcurrentProducerDurableConsumerTest
          DurableSubscriptionOfflineTest

          Show
          Kevin Earls added a comment - Also, these cause issues at least on AIX and Solaris. AMQ2584Test AMQ2870Test QueueMbeanRestartTest FailoverTransactionTest ConcurrentProducerDurableConsumerTest DurableSubscriptionOfflineTest
          Hide
          Gary Tully added a comment -

          also - org.apache.activemq.usecases.ThreeBrokerVirtualTopicNetworkAMQPATest

          Show
          Gary Tully added a comment - also - org.apache.activemq.usecases.ThreeBrokerVirtualTopicNetworkAMQPATest
          Hide
          Gary Tully added a comment -

          org.apache.activemq.bugs.AMQ2149Test needs a leveldb variant, and will fail atm

          Show
          Gary Tully added a comment - org.apache.activemq.bugs.AMQ2149Test needs a leveldb variant, and will fail atm
          Hide
          Gary Tully added a comment -

          adding failing org.apache.activemq.broker.region.cursors.StoreQueueCursorJournalNoDuplicateTest, but scenario where journal is used over a journaled pa is dubious.

          Show
          Gary Tully added a comment - adding failing org.apache.activemq.broker.region.cursors.StoreQueueCursorJournalNoDuplicateTest, but scenario where journal is used over a journaled pa is dubious.
          Hide
          Timothy Bish added a comment -

          We can disable the LevelDB variations for now and address these in v5.9 as KahaDB is still the default persistence adapter.

          Show
          Timothy Bish added a comment - We can disable the LevelDB variations for now and address these in v5.9 as KahaDB is still the default persistence adapter.

            People

            • Assignee:
              Timothy Bish
              Reporter:
              Timothy Bish
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development