You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by gt...@apache.org on 2020/02/28 09:47:15 UTC

[activemq] branch master updated: no jira - additional trace logging to kahadb cleanup/gc to identify datafile for durable sub command and pending count by sub key

This is an automated email from the ASF dual-hosted git repository.

gtully pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq.git


The following commit(s) were added to refs/heads/master by this push:
     new 5d03224  no jira - additional trace logging to kahadb cleanup/gc to identify datafile for durable sub command and pending count by sub key
5d03224 is described below

commit 5d03224880e0601fa7da18d87e5e1f2fefcc5263
Author: gtully <ga...@gmail.com>
AuthorDate: Fri Feb 28 09:47:02 2020 +0000

    no jira - additional trace logging to kahadb cleanup/gc to identify datafile for durable sub command and pending count by sub key
---
 .../java/org/apache/activemq/store/kahadb/MessageDatabase.java    | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
index ac8ea48..d12c7d9 100644
--- a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
+++ b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
@@ -1923,7 +1923,7 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe
                                 (pendingAcks.size() == 1 && pendingAcks.getTail().range() == 1)) {
 
                                 if (LOG.isTraceEnabled()) {
-                                    LOG.trace("Found candidate for rewrite: {} from file {}", entry.getKey(), dataFileId);
+                                    LOG.trace("Found candidate for rewrite: sub {} on {} from file {}", subscriptionKey, entry.getKey(), dataFileId);
                                 }
 
                                 final KahaSubscriptionCommand kahaSub =
@@ -1939,6 +1939,12 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe
                             }
                         }
 
+                        if (LOG.isTraceEnabled()) {
+                            final StoredDestination destination = entry.getValue();
+                            final String subscriptionKey = subscription.getKey();
+                            final SequenceSet pendingAcks = destination.ackPositions.get(tx, subscriptionKey);
+                            LOG.trace("sub {} on {} in dataFile {} has pendingCount {}", subscriptionKey, entry.getKey(), dataFileId, pendingAcks.rangeSize()-1);
+                        }
                         gcCandidateSet.remove(dataFileId);
                     }
                 }