HBASE-26305 Move NavigableSet add operation to writer thread in BucketCache (#3705)
Signed-off-by: Duo Zhang <zhangduo@apache.org> Reviewed-by: chenglei <chenglei@apache.org>
This commit is contained in:
parent
0748165ab0
commit
a2c09ae5bc
|
@ -475,7 +475,6 @@ public class BucketCache implements BlockCache, HeapSize {
|
|||
} else {
|
||||
this.blockNumber.increment();
|
||||
this.heapSize.add(cachedItem.heapSize());
|
||||
blocksByHFile.add(cacheKey);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1016,6 +1015,11 @@ public class BucketCache implements BlockCache, HeapSize {
|
|||
index++;
|
||||
continue;
|
||||
}
|
||||
BlockCacheKey cacheKey = re.getKey();
|
||||
if (ramCache.containsKey(cacheKey)) {
|
||||
blocksByHFile.add(cacheKey);
|
||||
}
|
||||
|
||||
BucketEntry bucketEntry = re.writeToCache(ioEngine, bucketAllocator, realCacheSize,
|
||||
this::createRecycler);
|
||||
// Successfully added. Up index and add bucketEntry. Clear io exceptions.
|
||||
|
|
Loading…
Reference in New Issue