kerneltime commented on code in PR #5604:
URL: https://github.com/apache/ozone/pull/5604#discussion_r1394992980


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/pipeline/Pipeline.java:
##########
@@ -102,6 +104,7 @@ private Pipeline(PipelineID id,
     this.creationTimestamp = Instant.now();
     this.suggestedLeaderId = suggestedLeaderId;
     this.replicaIndexes = new HashMap<>();
+    this.stateEnterTime = Instant.now();

Review Comment:
   This is used to compare against the configured clock in 
`SCMContainerManager` ```  private void 
initializeSystemManagers(OzoneConfiguration conf,
         SCMConfigurator configurator) throws IOException {
       // Use SystemClock when data is persisted
       // and used again after system restarts.
       systemClock = Clock.system(ZoneOffset.UTC);```
   Would it be possible to get the creation timestamp from the same clock here? 
Currently it should be fine but it would be more resistant to bugs due to 
refactoring in the future. 



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