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


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

Review Comment:
   https://github.com/apache/ozone/pull/12080#discussion_r4669193370
   
   Same is applicable here. Whichever goes first, you can create the helper 
function in that PR and then re-use/rebase it in the following PRs.



##########
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:
   yeah, its a good point. This is an existing `RpcClient` design issue, not 
specific to storage policy. The `omVersion` is cached once at client 
construction and never refreshed.
   
   @anuragp010  Can you raise a general improvement JIRA and link to 
HDDS-11233. The RpcClient could have an intelligence to retry once with a 
refreshed `omVersion` before rejecting(or infinite retries) - fetch the 
ServiceList, update the cached version, and re-check after Nth retry. This is a 
one-time cost per client lifetime (only triggers when the check would throw 
anyway), so zero overhead on the happy path. This would benefit all 
version-gated features, not just storage policy.



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