adityamukho commented on code in PR #7488:
URL: https://github.com/apache/ignite-3/pull/7488#discussion_r2797849006
##########
modules/network/src/main/java/org/apache/ignite/internal/network/DefaultMessagingService.java:
##########
@@ -210,6 +225,8 @@ public CompletableFuture<Void> send(String
recipientConsistentId, ChannelType ch
InternalClusterNode recipient =
topologyService.getByConsistentId(recipientConsistentId);
if (recipient == null) {
+ metrics.incrementMessageRecipientNotFound();
Review Comment:
Some metric sources use holders (AFAIK for those entities which expose parts
of their internal state through their API, which the holder can poll. One such
example is a thread pool. I could and set their holders to null when their
sources are disabled. However, this does not imply that the wrapped entity
itself (the thread pool in our example) has stopped keeping track of its
internal state.
The `MessagingServiceMetricSource`, OTOH, does not use a holder, since the
`DefaultMessagingService` does not have API methods to expose its internal
quantities (it doesn't have the ones we're interested in for metrics, in the
first place). So a `MessagingServiceMetrics` object is used to internally keep
track of these values.
Effectively, this does the same job as the internal variables of a thread
pool that keep track of its internal state (including the ones we use for
metrics), irrespective of whether its corresponding source is enabled or not.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]