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 2022/07/13 21:12:47 UTC

[GitHub] [ozone] errose28 commented on a diff in pull request #3595: HDDS-6885. Allow HDDS layout features to specify their finalization requirements.

errose28 commented on code in PR #3595:
URL: https://github.com/apache/ozone/pull/3595#discussion_r920518237


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/upgrade/HDDSLayoutFeature.java:
##########
@@ -22,32 +22,57 @@
 import java.util.Optional;
 
 import org.apache.hadoop.ozone.upgrade.LayoutFeature;
+import org.apache.hadoop.hdds.upgrade.HDDSFinalizationRequirements.PipelineRequirements;
 
 /**
  * List of HDDS Features.
  */
 public enum HDDSLayoutFeature implements LayoutFeature {
   //////////////////////////////  //////////////////////////////
-  INITIAL_VERSION(0, "Initial Layout Version"),
-  DATANODE_SCHEMA_V2(1, "Datanode RocksDB Schema Version 2 (with column " +
+
+  // TODO: After HDDS-6887 schema version changes will not require closing
+  //  pipelines.
+  INITIAL_VERSION(0,
+      new HDDSFinalizationRequirements.Builder().build(),
+      "Initial Layout Version"),
+  DATANODE_SCHEMA_V2(1,
+      new HDDSFinalizationRequirements.Builder()
+          .setPipelineRequirements(PipelineRequirements.CLOSE_ALL_PIPELINES)
+          .build(),
+      "Datanode RocksDB Schema Version 2 (with column " +
       "families)"),
-  SCM_HA(2, "Storage Container Manager HA"),
-  ERASURE_CODED_STORAGE_SUPPORT(3, "Ozone version with built in support for"
+  SCM_HA(2,
+      new HDDSFinalizationRequirements.Builder().build(),
+      "Storage Container Manager HA"),
+  ERASURE_CODED_STORAGE_SUPPORT(3,
+      new HDDSFinalizationRequirements.Builder()
+          // At least 5 datanodes are required for an EC pipeline.
+          .setMinFinalizedDatanodes(5)
+          .build(),
+      "Ozone version with built in support for"
       + " Erasure Coded block data storage."),
-  DATANODE_SCHEMA_V3(4, "Datanode RocksDB Schema Version 3 (one rocksdb " +
+  DATANODE_SCHEMA_V3(4,
+      new HDDSFinalizationRequirements.Builder()
+          .setPipelineRequirements(PipelineRequirements.CLOSE_ALL_PIPELINES)

Review Comment:
   That's right, pipelines would only be closed once. See the constructor in `HDDSLayoutVersionManager` and `HDDSFinalizationRequirements(Collection<HDDSFinalizationRequirements>)`. The requirements of all unfinalized layout features are aggregated to form one requirements object. This new object is what is acted upon during finalization.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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