openinx commented on a change in pull request #479: HBASE-22802 Avoid temp
ByteBuffer allocation in FileIOEngine#read
URL: https://github.com/apache/hbase/pull/479#discussion_r313256448
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
##########
@@ -689,7 +691,7 @@ private void freeEntireBuckets(int
completelyFreeBucketsNeeded) {
// this set is small around O(Handler Count) unless something else is
wrong
Set<Integer> inUseBuckets = new HashSet<>();
backingMap.forEach((k, be) -> {
- if (be.isRpcRef()) {
+ if (ioEngine.usesSharedMemory() && be.isRpcRef()) {
Review comment:
The javadoc says:
```
/**
* This method will find the buckets that are minimally occupied
* and are not reference counted and will free them completely
* without any constraint on the access times of the elements,
* and as a process will completely free at most the number of buckets
* passed, sometimes it might not due to changing refCounts
*
* @param completelyFreeBucketsNeeded number of buckets to free
**/
```
Means the free processing only consider the usage percentage regardless of
the accessCounter, so we will free the entire bucket even if we still have
some RPC reading for Exclusive ioengine ? That should be inconrrect ?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services