adoroszlai commented on a change in pull request #2303:
URL: https://github.com/apache/ozone/pull/2303#discussion_r645438265



##########
File path: 
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java
##########
@@ -164,13 +164,13 @@ public ContainerStateMachine(RaftGroupId gid, 
ContainerDispatcher dispatcher,
     int numPendingRequests = conf
         .getObject(DatanodeRatisServerConfig.class)
         .getLeaderNumPendingRequests();
-    int pendingRequestsByteLimit = (int) conf.getStorageSize(
+    int pendingRequestsMegaBytesLimit = (int) conf.getStorageSize(
         OzoneConfigKeys.DFS_CONTAINER_RATIS_LEADER_PENDING_BYTES_LIMIT,
         OzoneConfigKeys.DFS_CONTAINER_RATIS_LEADER_PENDING_BYTES_LIMIT_DEFAULT,
-        StorageUnit.BYTES);
+        StorageUnit.MB);
     stateMachineDataCache = new ResourceLimitCache<>(new ConcurrentHashMap<>(),
         (index, data) -> new int[] {1, data.size()}, numPendingRequests,

Review comment:
       @sadanand48 I think acceptance test failure is caused by this change.  
1KB keys can be created, but anything beyond that fails.
   
   Limit is in megabytes, `data.size()` needs to be converted.
   
   ```suggestion
           (i, data) -> new int[] {1, (int) 
StorageUnit.MB.fromBytes(data.size())},
           numPendingRequests,
   ```




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

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