adoroszlai commented on a change in pull request #598: HDDS-3067. Fix Bug in 
Scrub Pipeline causing destory pipelines after SCM restart.
URL: https://github.com/apache/hadoop-ozone/pull/598#discussion_r383679859
 
 

 ##########
 File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/SCMPipelineManager.java
 ##########
 @@ -153,6 +153,8 @@ protected void initializePipelineState() throws 
IOException {
           .newBuilder(HddsProtos.Pipeline.PARSER.parseFrom(entry.getValue()));
       Pipeline pipeline = Pipeline.getFromProtobuf(pipelineBuilder.setState(
           HddsProtos.PipelineState.PIPELINE_ALLOCATED).build());
+      // When SCM is restarted, set Creation time with current time.
+      pipeline.setCreationTimestamp(Instant.now());
 
 Review comment:
   Nit: this should go after `Preconditions.checkNotNull` in the next line, 
otherwise the check becomes unnecessary (will never fail).  The result is the 
same anyway (NPE).

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to