anuragp010 commented on code in PR #12022:
URL: https://github.com/apache/ozone/pull/12022#discussion_r4585776548


##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java:
##########
@@ -2625,6 +2633,9 @@ public OzoneOutputStream createFile(String volumeName, 
String bucketName,
             + " Erasure Coded replication.");
       }
     }
+    if (storagePolicy != null && 
!OzoneManagerVersion.STORAGE_POLICY_SUPPORT.isSupportedBy(omVersion)) {

Review Comment:
   You're right that a client opened before finalization keeps the old OM 
version. `omVersion` is read once in the constructor and never refreshed. This 
would be an issue across all the client APIs modified to support storage 
policy. 
   If we were to add a refresh of `omVersion` before rejecting, all the clients 
opened pre-finalization, attempting to use any storagePolicy would result in 
making an additional call to the OM. Would this result in some overhead on the 
OM post finalization?
   
   If so, I propose we document that applications reconnect. What do you think? 
   And where would recommend we document this?



##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java:
##########
@@ -2617,6 +2617,14 @@ private OzoneInputStream getInputStreamWithRetryFunction(
   public OzoneOutputStream createFile(String volumeName, String bucketName,
       String keyName, long size, ReplicationConfig replicationConfig,
       boolean overWrite, boolean recursive) throws IOException {
+    return createFile(volumeName, bucketName, keyName, size, replicationConfig,
+        overWrite, recursive, null);
+  }
+
+  @Override
+  public OzoneOutputStream createFile(String volumeName, String bucketName,

Review Comment:
    Good question. The write will succeed, and it can land on `DISK` - but only 
if we're at the global pipeline limit. For EC, SCM currently reuses existing 
open pipelines without filtering by `StorageTier` when we're at the global 
pipeline limit. (`WritableECContainerProvider.getContainer`, which has `TODO 
StoragePolicy Support EC`; `PipelineManagerImpl.buildECPipeline` has the same 
TODO). So an EC `COLD` request can be served from an existing `DISK` pipeline 
once the pipeline limit is reached. 
   But, `createKey` currently behaves the same way as EC work is part of a 
follow-up [JIRA](https://issues.apache.org/jira/browse/HDDS-16678), so 
rejecting the combination only in `createFile` would make it inconsistent. For 
that reason, I'd rather leave it to the SCM EC work.



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