Radiancebobo commented on code in PR #3706:
URL: https://github.com/apache/bookkeeper/pull/3706#discussion_r1053907306
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/util/collections/ConcurrentLongHashMap.java:
##########
@@ -226,6 +226,12 @@ public V computeIfAbsent(long key, LongFunction<V>
provider) {
return getSection(h).put(key, null, (int) h, true, provider);
}
+ public V computePut(long key, LongFunction<V> provider, boolean
onlyIfAbsent) {
Review Comment:
the ```computePut``` is similar to ``` computeIfAbsent``` , computePut is
currently only used for testing.
> Found another bug, when the onlyIfAbsent of
`org.apache.bookkeeper.util.collections.ConcurrentLongHashMap.Section#put` is
false, the following unit test fails, I will fix it together:

>
>

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