Repository navigation
Conversation
… short operations HBase computes MILLIS_BETWEEN_NEXTS as a sum of wall-clock millisecond deltas between scanner creation and each scan RPC response. The global metric tests scan 10 rows in one region, which takes one RPC. When that RPC finishes within the same millisecond tick the sum is 0, so the "> 0" checks fail intermittently on fast hosts. MUTATION_COMMIT_TIME is also a wall-clock millisecond delta, and a commit of 10 small rows can also finish within one tick. Assert instead that the operation records each metric (sample count > 0), and keep the strict checks on the other scan and mutation metrics. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the test-only timing-assertion changes.
No open issues 🎉
What changed in this PR
This test-only change addresses intermittent metric assertion failures on fast hosts by allowing valid zero-millisecond timings.
Changes:
- Check recorded samples instead of positive values for scan intervals and mutation commit times.
- Explain the timing resolution in comments; leave other metric checks unchanged.
| File | Description |
|---|---|
| phoenix-core/src/it/java/org/apache/phoenix/monitoring/PhoenixMetricsIT.java | Updates four timing assertions across query, mutation, and upsert-select tests. |
Review effort: Balanced
This was referenced Dec 4, 2026
Contributor
Author
|
Precommit note: the failures in this run are not related to this change. Each one is a known problem on master.
(Claude Code) |
This was referenced Dec 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some global metric checks fail intermittently on fast hosts. The time between scanner next calls is a sum of wall-clock millisecond deltas. The global metric tests scan a few rows in one region, which takes one RPC. When that RPC completes in the same millisecond tick, the sum is 0. The mutation commit time is also a millisecond delta, and a small commit can also give 0. In both cases 0 is a correct value.
The change is test-only. The checks on these two metrics now require a recorded sample, not a nonzero value. The tests reset the metrics before each measured operation, so the check still proves that the operation records the metric. The checks on the other metrics do not change.
🤖 Generated with Claude Code