cschneider commented on a change in pull request #8: SLING-8531 - Exponential
backoff for retries
URL:
https://github.com/apache/sling-org-apache-sling-distribution-journal/pull/8#discussion_r301982995
##########
File path:
src/main/java/org/apache/sling/distribution/journal/impl/shared/JournalAvailableChecker.java
##########
@@ -60,26 +63,33 @@
@Reference
DistributionMetricsService metrics;
-
+
private BundleContext context;
private volatile ServiceRegistration<JournalAvailable> reg;
private GaugeService<Boolean> gauge;
+ private ExponentialBackOff backoffRetry;
+
+ private AtomicInteger numErrors;
+
@Activate
public void activate(BundleContext context) {
requireNonNull(provider);
requireNonNull(topics);
this.context = context;
+ this.numErrors = new AtomicInteger();
gauge = metrics.createGauge(DistributionMetricsService.BASE_COMPONENT
+ ".journal_available", "", this::isAvailable);
LOG.info("Started Journal availability checker service");
+ startChecks();
Review comment:
Hmm.. that is maybe not the intended behaviour. If I simply publish the
marker service then we do not check the topics at the start.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services