greenwich commented on code in PR #10946:
URL: https://github.com/apache/ozone/pull/10946#discussion_r3781667661


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -729,6 +733,10 @@ private OzoneManager(OzoneConfiguration conf, 
StartupOption startupOption)
     omClientProtocolMetrics = ProtocolMessageMetrics
         .create("OmClientProtocol", "Ozone Manager RPC endpoint",
             OzoneManagerProtocolProtos.Type.class);
+    String configuredStoragePolicy = conf.get(
+        OZONE_DEFAULT_STORAGE_POLICY_KEY, 
OZONE_DEFAULT_STORAGE_POLICY_DEFAULT);
+    OzoneStoragePolicy.setDefaultPolicy(OzoneStoragePolicy.valueOf(

Review Comment:
   the config is honoured on the OM side (OMKeyRequest:212, same JVM). But 
getDefaultPolicy() at the SCM translator (:201) runs in the SCM JVM where 
nothing ever calls the setter, so it always returns the hardcoded WARM — the 
old-OM compat default is not configurable, and the mutable static only appears 
to work because MiniOzoneCluster shares a JVM.



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -729,6 +733,10 @@ private OzoneManager(OzoneConfiguration conf, 
StartupOption startupOption)
     omClientProtocolMetrics = ProtocolMessageMetrics
         .create("OmClientProtocol", "Ozone Manager RPC endpoint",
             OzoneManagerProtocolProtos.Type.class);
+    String configuredStoragePolicy = conf.get(
+        OZONE_DEFAULT_STORAGE_POLICY_KEY, 
OZONE_DEFAULT_STORAGE_POLICY_DEFAULT);
+    OzoneStoragePolicy.setDefaultPolicy(OzoneStoragePolicy.valueOf(

Review Comment:
   the config is honoured on the OM side (OMKeyRequest:212, same JVM). 
   But getDefaultPolicy() at the SCM translator (:201) runs in the SCM JVM 
where nothing ever calls the setter, so it always returns the hardcoded WARM — 
the old-OM compat default is not configurable, and the mutable static only 
appears to work because MiniOzoneCluster shares a JVM.



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