Xushaohong commented on a change in pull request #3140:
URL: https://github.com/apache/ozone/pull/3140#discussion_r816550770



##########
File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyRequest.java
##########
@@ -132,6 +132,12 @@ protected KeyArgs resolveBucketLink(
       int preallocateBlocksMax, boolean grpcBlockTokenEnabled, String omID)
       throws IOException {
 
+    // avoid contact with scm for OMThroughputBenchmark test
+    if (preallocateBlocksMax < 1) {
+      LOG.debug("preallocateBlocksMax smaller than 1, skip allocateBlock");
+      return new ArrayList<>();
+    }

Review comment:
       This is designed to avoid contacting SCM to alleviate the extra 
influence. Here is also a logic bug, if the config 
```ozone.key.preallocation.max.blocks``` is 0(preallocateBlocksMax =0), OM will 
still contact SCM to allocateBlock, which is unreasonable. Do you think it 
shall be fixed?
   




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