Skip to content

PHOENIX-7562 Add HAGroupStore Metrics2 observability#2576

Open
ritegarg wants to merge 1 commit into
apache:PHOENIX-7562-feature-newfrom
ritegarg:hagroupstore-metrics
Open

PHOENIX-7562 Add HAGroupStore Metrics2 observability#2576
ritegarg wants to merge 1 commit into
apache:PHOENIX-7562-feature-newfrom
ritegarg:hagroupstore-metrics

Conversation

@ritegarg

@ritegarg ritegarg commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Expose focused per-HA-group observability without coupling metrics to HA decisions.

What changes were proposed in this pull request?

  • Add a process-lifetime Hadoop Metrics2 source per HA group with 5 gauges, 6 counters, and 1 listener-latency histogram.
  • Export zero-is-good local-cache and peer-visibility status gauges, stable non-ordinal HA state codes, and selected episode/failure counters.
  • Tag each source by HA group and safely quote its JMX identity.
  • Add focused unit and two-cluster integration coverage for the exported contract and runtime behavior.

Why are the changes needed?

HAGroupStore currently relies on logs for cache health, peer reachability, state divergence, fail-closed behavior, background failures, and slow synchronous listeners. These metrics provide alertable current state and targeted diagnostics while remaining independent of HA control flow.

Does this PR introduce any user-facing change?

Yes. RegionServers expose new HAGroupStore Metrics2/JMX metrics. There is no SQL, JDBC, or HA decision behavior change.

How was this patch tested?

  • Unit tests:
    mvn -pl phoenix-core -am -DskipITs -Dtest=HAGroupStoreRecordTest,HAGroupStoreMetricsSourceImplTest -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false test
  • Integration tests:
    mvn -pl phoenix-core -am -Dtest=NoSuchUnitTest -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false -Dit.test=HAGroupStoreMetricsIT -DskipParallelStatsEnabledTests=true -DskipParallelStatsDisabledTests=true verify
  • Result: 27 unit tests and 7 integration tests passed.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Cursor 3.9.16

Expose a focused per-group health, state, failure, and listener-latency contract without coupling metrics to HA decisions.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant