Demogorgon314 commented on code in PR #15707:
URL: https://github.com/apache/pulsar/pull/15707#discussion_r879031781


##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/util/RangeCache.java:
##########
@@ -73,12 +74,13 @@ public RangeCache(Weighter<Value> weighter, 
TimestampExtractor<Value> timestampE
      * @return whether the entry was inserted in the cache
      */
     public boolean put(Key key, Value value) {
-        if (entries.putIfAbsent(key, value) == null) {
+        AtomicBoolean flag = new AtomicBoolean(false);

Review Comment:
   Better be using `MutableBoolean`? 



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