mattisonchao commented on code in PR #20506:
URL: https://github.com/apache/pulsar/pull/20506#discussion_r1220639752
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/cache/RangeEntryCacheManagerImpl.java:
##########
@@ -106,12 +106,12 @@ public void removeEntryCache(String name) {
entryCache.clear();
if (log.isDebugEnabled()) {
- log.debug("Removed cache for {} - Size: {} -- Current Size: {}",
name, size / MB, currentSize.get() / MB);
+ log.debug("Removed cache for {} - Size: {} -- Current Size: {}",
name, size / MB, currentSize.sum() / MB);
}
}
boolean hasSpaceInCache() {
- long currentSize = this.currentSize.get();
+ long currentSize = this.currentSize.sum();
Review Comment:
+1, could you provide something to prove there has some concurrent issue and
that your changes can improve the performance?
--
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]