ivandika3 commented on code in PR #11620:
URL: https://github.com/apache/ozone/pull/11620#discussion_r4332085597
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHAFollowerReadWithAllRunning.java:
##########
@@ -589,8 +589,13 @@ void testClientWithFollowerReadDisabled() throws Exception
{
assertEquals(leaderOMNodeId,
leaderProxyProvider.getCurrentProxyOMNodeId());
// Try to transfer leadership
+ List<OzoneManager> originalOMs = new
ArrayList<>(getCluster().getOzoneManagersList());
Review Comment:
I think it's better to do the defensive copy in the `getOzoneManagersList`
method directly. The `MiniOzoneHAService` already have mutation methods in
`addInstance` `removeInstance`, etc. Therefore, I think I was assuming that
`getOzoneManagersList` returns a defensive copy. This also applied to the other
files.
I currently see no reason why we want to return the actual list, which can
be misused.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]