lordcheng10 commented on a change in pull request #3061:
URL: https://github.com/apache/bookkeeper/pull/3061#discussion_r808877551



##########
File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/util/collections/ConcurrentLongLongPairHashMap.java
##########
@@ -376,7 +380,16 @@ private boolean remove(long key1, long key2, long value1, 
long value2, int keyHa
                 }
 
             } finally {
-                unlockWrite(stamp);
+                if (size < resizeThresholdBelow) {

Review comment:
       I agree to add a new configuration autoShrink to control whether to 
shrink or not. @eolivelli 
   
   Then we have to solve a problem: when autoShrink=false, even if the map has 
a lot of space, the expansion will be triggered frequently, because the 
condition of our expansion is not to see the actual use size of the map.




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


Reply via email to