You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2022/02/23 06:30:44 UTC

[GitHub] [bookkeeper] eolivelli commented on a change in pull request #3072: reduce unnecessary expansions for ConcurrentLong map and set

eolivelli commented on a change in pull request #3072:
URL: https://github.com/apache/bookkeeper/pull/3072#discussion_r812589754



##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/util/collections/ConcurrentLongHashMap.java
##########
@@ -377,6 +377,16 @@ private V remove(long key, Object value, int keyHash) {
                             if (nextValueInArray == EmptyValue) {
                                 values[bucket] = (V) EmptyValue;
                                 --usedBuckets;
+
+                                // Cleanup all the buckets that were in `DeletedValue` state,

Review comment:
       It looks like we can create a common private method to reduce code duplication in this class
   Smaller methods are better in java
   




-- 
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: issues-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org