PHOENIX-7992 Add replay-side performance metrics for HA replication - #2607
Draft
Himanshu-g81 wants to merge 2 commits into
Draft
PHOENIX-7992 Add replay-side performance metrics for HA replication#2607Himanshu-g81 wants to merge 2 commits into
Himanshu-g81 wants to merge 2 commits into
Conversation
Adds six standby replay-side performance metrics, each inheriting the
per-haGroup dimension from its metric source.
ReplicationLogDiscoveryReplay:
- endToEndReplayLagMs (histogram): round-eligible -> replay finished
- pickupLagMs (histogram): round-eligible -> file claimed (rename into
the in-progress directory)
ReplicationLogDiscovery (shared base):
- roundsExceedingRoundTime (counter): rounds whose new-file processing
duration exceeded roundTimeMills
ReplicationLogProcessor:
- mutationsReplayedCount (counter): replay throughput across all files
- mutationsPerFile (histogram): per-file mutation count, recorded only
for files that replayed at least one mutation so rotation-only files
do not skew the distribution toward zero
ReplicationLogTracker:
- markFileInProgressCollisionCount (counter): claim renames lost to a
competing process, a strict subset of the request count
The lag metrics use the round-eligible instant (round end + waiting
buffer) as the zero reference, so they exclude the fixed built-in wait
rather than measuring raw file age.
Tests: metric-source plumbing for all six metrics, plus recording-site
tests for the collision metric (rename-loses vs rename-wins) and the
slow-round metric (fast round vs slow round).
Record pickupLag only on a file's first claim, skipping in-progress reclaims that re-stamp the rename timestamp; anchor round-boundary files to the earlier round in getRoundEligibleTime; and rename two counters to match what they actually measure: mutationsReplayedCount -> successfulFileMutationsReplayedCount and markFileInProgressCollisionCount -> markFileInProgressRenameFailedCount. Adds ReplicationLogDiscoveryReplayProcessFileTest covering the eligibility math, first-claim-only pickup lag, and mid-replay failure handling.
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.
Adds six per-HA-group standby replay-side performance metrics (replay lag, pickup lag, mutations replayed + per-file, rename-failed count, slow-round count) for HA replication — new observability surface, no behavioral change.