javeme commented on code in PR #2604:
URL:
https://github.com/apache/incubator-hugegraph/pull/2604#discussion_r1818086493
##########
hugegraph-store/hg-store-node/src/main/java/org/apache/hugegraph/store/node/metrics/JRaftMetrics.java:
##########
@@ -65,10 +65,18 @@ public class JRaftMetrics {
private JRaftMetrics() {
}
- public synchronized static void init(MeterRegistry meterRegistry) {
+ public synchronized static void init(MeterRegistry meterRegistry, boolean
isInitialCall) {
if (registry == null) {
registry = meterRegistry;
registerMeters();
+ if (isInitialCall) {
+ log.debug("JRaftMetrics initialized during application
startup");
+ } else {
+ log.debug("JRaftMetrics initialized during scheduled refresh");
+ }
+ } else if (!isInitialCall) {
+ registerNodeMetrics();
Review Comment:
prefer to add a new method like resetNodeMetrics() instead of adding a
isInitialCall param
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]