sodonnel commented on a change in pull request #2973:
URL: https://github.com/apache/ozone/pull/2973#discussion_r785844797



##########
File path: 
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/container/common/helpers/ExcludeList.java
##########
@@ -34,31 +38,56 @@
  */
 public class ExcludeList {
 
-  private final Set<DatanodeDetails> datanodes;
+  private final Map<DatanodeDetails, Long> datanodes;
   private final Set<ContainerID> containerIds;
   private final Set<PipelineID> pipelineIds;
+  private long expiryTime = 0;
+  private java.time.Clock clock;
 
 
   public ExcludeList() {
-    datanodes = new HashSet<>();
+    datanodes = new HashMap<>();

Review comment:
       I think this needs to be a ConcurrentHashMap (or synchronize all public 
methods in the class), as we could run into trouble it we add a datanode while 
iterating the list to remove entries.




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

Reply via email to