Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(hstore): JRaft Metrics miss #2604

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

JackyYangPassion
Copy link
Contributor

Purpose of the PR

Main Changes

Verifying these changes

  • Trivial rework / code cleanup without any test coverage. (No Need)
  • Already covered by existing tests, such as (please modify tests here).
  • Need tests and can be verified as follows:
    • xxx

Does this PR potentially affect the following parts?

Documentation Status

  • Doc - TODO
  • Doc - Done
  • Doc - No Need

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. store Store module labels Jul 29, 2024
@shirleyStorage
Copy link
Contributor

LGTM~.
By the way, may be we can add some metrics-related unit tests.

@Scheduled(fixedRate = 30000)
public void refreshMetrics() {
log.info("Refreshing metrics");
JRaftMetrics.init(registry,false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expect a space

@@ -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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we refactor to this style JRaftMetrics.instance(registry)

@@ -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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isInitialCall -- Is there an elegant way to avoid this a bit complex branching?

Copy link

github-actions bot commented Sep 9, 2024

Due to the lack of activity, the current pr is marked as stale and will be closed after 180 days, any update will remove the stale label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inactive size:M This PR changes 30-99 lines, ignoring generated files. store Store module
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

[Bug] HStore Spring Actuator Metrics Sink Initialization once causes missing metrics
5 participants