FUSE Message Broker
  1. FUSE Message Broker
  2. MB-1117

KahaDB journal files retained after delay in "unsubscribing" durable subscriber from topic.

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: 5.5.1-fuse-02-05
    • Component/s: broker
    • Labels:
      None
    • Environment:
      replicated on 5.5.1-fuse-03-04
    • Similar Issues:
      Show 10 results 

      Description

      KahaDB journal files retained after delay in "unsubscribing" durable subscriber from topic.This issue only appears to occur when Durable Subscriber is registered with a "selector" that does not match all messages on topic.

      Scenario:

      Msg Producer sending messages to topic.

      Durable subscriber registered with a selector on topic
      After 20 seconds; stop calling consumer.receive() .
      Another Durable subscriber registers on the topic
      After 20 seconds; stop calling consumer.receive() .
      Continue this pattern till 10 durable subscribers are registered with topic

      Then unsubscribe all 10 Durable subscribers.

      Other Notes:
      When durable subs unsubscribed DIRECTLY after use, no KahaDB journal files are retained
      When selector "matches" all messages, no KahaDB journal files are retained
      No subscribers appear to be subscribed to topic in JMX tree at end of test (using jconsole to visually inspect)

      For 5.5.1.Fuse-03-04 KahaDB debug log contains:

      ..  Checkpoint started.
      2012-03-09 15:07:35,018 [eckpoint Worker] - TRACE MessageDatabase                - Last update: 36:354945, full gc candidates set: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
      2012-03-09 15:07:35,018 [eckpoint Worker] - TRACE MessageDatabase                - gc candidates after first tx:36:354945, [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35]
      2012-03-09 15:07:35,019 [eckpoint Worker] - TRACE MessageDatabase                - gc candidates after dest:1:TopicT, [3, 4, 5, 6, 7]
      2012-03-09 15:07:35,019 [eckpoint Worker] - TRACE MessageDatabase                - gc candidates: [3, 4, 5, 6, 7]
      2012-03-09 15:07:35,019 [eckpoint Worker] - DEBUG MessageDatabase                - Cleanup removing the data files: [3, 4, 5, 6, 7]
      2012-03-09 15:07:35,019 [eckpoint Worker] - DEBUG MessageDatabase                - Checkpoint done.
      

      Same test in 5.4.2.Fuse-02-00 gives KahaDB debug log

      ... - Checkpoint started.
      2012-03-09 15:14:21,703 [eckpoint Worker] TRACE MessageDatabase                - Last update: 36:225386, full gc candidates set: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
      2012-03-09 15:14:21,703 [eckpoint Worker] TRACE MessageDatabase                - gc candidates after first tx:36:225386, [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35]
      2012-03-09 15:14:21,703 [eckpoint Worker] TRACE MessageDatabase                - gc candidates after dest:1:TopicT, [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35]
      2012-03-09 15:14:21,703 [eckpoint Worker] TRACE MessageDatabase                - gc candidates: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35]
      2012-03-09 15:14:21,703 [eckpoint Worker] DEBUG MessageDatabase                - Cleanup removing the data files: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35]
      2012-03-09 15:14:21,707 [eckpoint Worker] DEBUG MessageDatabase                - Checkpoint done.
      
      

        Issue Links

          Activity

          Hide
          Pat Fox
          added a comment -

          This issue was originally detected in DurableSubProcessWithRestartTest.java. I believe DurableSubSelectorDelayTest reproduces the same issue but in a simpler approach.

          Show
          Pat Fox
          added a comment - This issue was originally detected in DurableSubProcessWithRestartTest.java. I believe DurableSubSelectorDelayTest reproduces the same issue but in a simpler approach.
          Hide
          Timothy Bish
          added a comment -

          Fixed merged to 5.5.1-fuse branch.

          Show
          Timothy Bish
          added a comment - Fixed merged to 5.5.1-fuse branch.
          Show
          Gary Tully
          added a comment - snapshot with the fix: http://repo.fusesource.com/nexus/content/repositories/snapshots/org/apache/activemq/apache-activemq/5.5.1.fuse-SNAPSHOT/apache-activemq-5.5.1.fuse-20120412.134309-11-bin.tar.gz

            People

            • Assignee:
              Timothy Bish
              Reporter:
              Pat Fox
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: