kevin-wu24 commented on PR #18304: URL: https://github.com/apache/kafka/pull/18304#issuecomment-2571772692
Pushed some commits. Changes of note: - Moved `DefaultExternalKRaftMetrics` to `/core/src/main/scala/kafka/raft` to avoid circular dependency and avoid `BrokerServerMetrics` and `ControllerMetadataMetrics` needing to implement another interface. - I'm not sure whether or not it makes sense to provide a mock implementation of `ExternalKRaftMetrics` for the purpose of testing. The most recent changes just use the `DefaultExternalKRaftMetrics` implementation directly, since we want to validate that the metrics values in the `brokerServerMetrics` and `controllerMetadataMetrics` objects contained in the implementation are actually being updated. This has the side effect of requiring dependencies being added in the build file for `raft` tests and allowing the relevant imports. - Added tests in `KafkaMetricsTest` for the newly-added `number-of-voters`, `number-of-observers`, and `uncommitted-voter-change`. - Added `testLeaderMetricsAreReset` in `KafkaRaftClientReconfigTest` to cover the case where a leader loses leadership and regains it, checking that `number-of-observers` and `uncommitted-voter-change` are not using the values from previous leadership. -- 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]
