sodonnel commented on code in PR #4888:
URL: https://github.com/apache/ozone/pull/4888#discussion_r1229230957


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/WritableECContainerProvider.java:
##########
@@ -128,6 +129,8 @@ public ContainerInfo getContainer(final long size,
       synchronized (pipeline.getId()) {
         try {
           ContainerInfo containerInfo = getContainerFromPipeline(pipeline);
+          Optional.ofNullable(containerInfo)
+              .ifPresent(ContainerInfo::updateLastUsedTime);

Review Comment:
   At this point in the code, we are not sure if this container is going to be 
used or not, as it may be excluded by the logic just below this.
   
   I think the update needs to be just before the return at line 143 in the 
diff:
   
   ```
   } else {
     containerInfo.updateLastUsedTime();
     return containerInfo;
   }
   ```   
   
   Does the lastUsedTime get set correct in the allocateContainer() call when 
the container is first created?



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