You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/02/25 06:47:51 UTC

[GitHub] [hadoop-ozone] adoroszlai commented on a change in pull request #598: HDDS-3067. Fix Bug in Scrub Pipeline causing destory pipelines after SCM restart.

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org