HBASE-26325 Backport the HBASE-26305 to branch-1. Move NavigableSet add operation to writer thread in BucketCache (#3776)
Signed-off-by: Reid Chan <reidchan@apache.org>
This commit is contained in:
parent
0d214ff53e
commit
1701f0de0a
|
@ -467,7 +467,6 @@ public class BucketCache implements BlockCache, HeapSize {
|
|||
} else {
|
||||
this.blockNumber.incrementAndGet();
|
||||
this.heapSize.addAndGet(cachedItem.heapSize());
|
||||
blocksByHFile.add(cacheKey);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -921,6 +920,12 @@ 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, deserialiserMap, realCacheSize);
|
||||
// Successfully added. Up index and add bucketEntry. Clear io exceptions.
|
||||
|
|
Loading…
Reference in New Issue