nikramakrishnan commented on PR #16005: URL: https://github.com/apache/kafka/pull/16005#issuecomment-2125001875
Hi @muralibasani, thanks for the PR! As I understand it, the issue here is that `rlm.startup()` (which internally calls `remoteLogMetadataManager.configure`) is not called first when there is metadata to catch up on during broker startup. This means that RemoteLogManager may be non-null, but `applyDelta` ends up calling `rlm.onLeadershipChange` (which calls `remoteLogMetadataManager.onPartitionLeadershipChanges`) before `configure` is invoked on `remoteLogMetadataManager`. A possible way to test this could be to mock `configure` and `onPartitionLeadershipChanges` in `RemoteLogMetadataManager`, then call `applyDelta` with some leadership changes, and assert that configure was called on the mock before `onPartitionLeadershipChanges`. -- 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]
