sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject [sling-org-apache-sling-distribution-journal] 03/03: SLING-9037 - Only call busy after precondition check
Date Wed, 29 Jan 2020 13:44:49 GMT
This is an automated email from the ASF dual-hosted git repository.

cschneider pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-distribution-journal.git

commit ba6a425db1fc450c51d6815f1d467e98cb161de6
Author: Christian Schneider <cschneid@adobe.com>
AuthorDate: Wed Jan 29 14:43:43 2020 +0100

    SLING-9037 - Only call busy after precondition check
---
 .../distribution/journal/impl/subscriber/DistributionSubscriber.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/distribution/journal/impl/subscriber/DistributionSubscriber.java
b/src/main/java/org/apache/sling/distribution/journal/impl/subscriber/DistributionSubscriber.java
index 44b33fd..c0579c5 100644
--- a/src/main/java/org/apache/sling/distribution/journal/impl/subscriber/DistributionSubscriber.java
+++ b/src/main/java/org/apache/sling/distribution/journal/impl/subscriber/DistributionSubscriber.java
@@ -366,7 +366,6 @@ public class DistributionSubscriber implements DistributionAgent {
             bookKeeper.sendStoredStatus();
             DistributionQueueItem item = blockingPeekQueueItem();
 
-            subscriberIdle.busy();
             try (Timer.Context context = distributionMetricsService.getProcessQueueItemDuration().time())
{
                 processQueueItem(item);
             } finally {
@@ -403,6 +402,7 @@ public class DistributionSubscriber implements DistributionAgent {
         long offset = queueItem.get(RECORD_OFFSET, Long.class);
         PackageMessage pkgMsg = queueItem.get(PACKAGE_MSG, PackageMessage.class);
         boolean skip = shouldSkip(offset);
+        subscriberIdle.busy();
         if (skip) {
             bookKeeper.removePackage(pkgMsg, offset);
         } else {


Mime
View raw message