symious opened a new pull request, #1587:
URL: https://github.com/apache/ratis/pull/1587

   ## What changes were proposed in this pull request?
   
   When a LogAppender is restarted, a new `FollowerInfo` is created, but the 
old follower gauges (`follower_<id>_next_index`, `match_index`, 
`rpc_response_time`) are never removed. The registry does not replace an 
existing gauge, so these gauges keep reading the stopped `FollowerInfo` and 
stop changing.
   
   This PR removes the follower gauges when senders are stopped and before 
re-registering them.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/RATIS-2685
   
   ## How was this patch tested?
   
   Added `TestLogAppenderMetrics#testFollowerGaugesAfterReAdd`, which fails 
without the fix.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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]

Reply via email to