Sigma-Ma opened a new pull request, #8563: URL: https://github.com/apache/hbase/pull/8563
JIRA: https://issues.apache.org/jira/browse/HBASE-29640 **What changes were proposed in this pull request?** This pull request adds an `oldestProcedureAge` gauge to the existing `Master,sub=Procedure` metrics source. The gauge reports the age in milliseconds of the oldest unfinished master procedure, calculated from its submitted time. The metric returns zero when there are no active procedures or when the master procedure executor is not yet available. Finished procedures are ignored, and negative values caused by clock adjustments are clamped to zero. **Why are the changes needed?** Operators currently have no direct metric for identifying how long the oldest master procedure has been active. Exposing this value makes it easier to detect stuck or unexpectedly long-running procedures and to configure monitoring and alerting around procedure execution. **How was this patch tested?** A new `TestOldestProcedureMetrics` test verifies: - Selection of the oldest unfinished procedure. - Exclusion of finished procedures. - Export of the `oldestProcedureAge` gauge. - The zero value when there are no active procedures. - The zero value when the procedure executor is unavailable. - Protection against negative values after clock adjustments. ```bash mvn -pl hbase-server -am \ -Dtest=TestOldestProcedureMetrics \ -Dsurefire.failIfNoSpecifiedTests=false test -- 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]
