liyuheng55555 commented on code in PR #14814:
URL: https://github.com/apache/iotdb/pull/14814#discussion_r1954712987


##########
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/IoTConsensus.java:
##########
@@ -174,7 +175,7 @@ private void initAndRecover() throws IOException {
               new IoTConsensusServerImpl(
                   path.toString(),
                   new Peer(consensusGroupId, thisNodeId, thisNode),
-                  new ArrayList<>(),
+                  new TreeSet<>(),

Review Comment:
   Previously, duplicates were removed during configuration persistence. Now 
that the persistence code is gone, a set is used to keep this logic. 
   
   TreeSet is used to return a List<Peer> with a consistent order (for an 
interface), which I believe is better than the unordered HashSet.



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