sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Boston <ianbos...@gmail.com>
Subject MetricsService question.
Date Thu, 19 Jan 2017 09:18:32 GMT
Hi,

Is the intention that [1] should use the same approach as [2] so that there
is 1 MetricsRegistry per JVM ?

ie Check for a MetricsRegistry as a service, and if not present create one,
so that there is only 1 which reporters can report on.

I am wondering how this will be made thread safe, as IIRC multiple threads
could perform the operation in independent bundles and there are no shared
objects to synchronise on. Perhaps the risk of that is so low it doesn't
matter, however, at scale, if its could happen, it will.

Best Regards
Ian



1
https://github.com/apache/sling/blob/cf1d325b262250358b3ea2003cbc889009bafed4/bundles/commons/metrics/src/main/java/org/apache/sling/commons/metrics/internal/MetricsServiceImpl.java#L55

2
https://github.com/apache/jackrabbit-oak/blob/2acda3156cfad9993310e7aa0492cdc0b65aa5f7/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/metric/StatisticsProviderFactory.java#L141

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message