keith-turner commented on PR #5364:
URL: https://github.com/apache/accumulo/pull/5364#issuecomment-2691502837
> In the second case, we avoid NPEs and these don't have any effect on the
metrics. Does this seem correct? Did you have something else in mind?
That does seem like it would avoid the NPE. I had something slightly
different in mind, but was not sure if it was correct. What you have seems
better. Was thinking of something like the following.
```java
private final AtomicInteger queued = new AtomicInteger(0);
```
Then at registration time just ignore the returned value, seems like it
returns what is given to it looking at one impl. However was not sure if its
always safe to do this.
```java
// register w/o assigning returned value
registry.gauge(METRICS_MAJC_QUEUED, Tags.of("id", ceid.canonical()),
m.queued)
```
--
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]