You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2021/10/01 12:58:17 UTC
[hbase] branch master updated: HBASE-26305 Move NavigableSet add
operation to writer thread in BucketCache (#3705)
This is an automated email from the ASF dual-hosted git repository.
zhangduo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push:
new d3c86f4 HBASE-26305 Move NavigableSet add operation to writer thread in BucketCache (#3705)
d3c86f4 is described below
commit d3c86f4f9071d4eb0919f6baefa8f7cb5c8b7368
Author: Yutong Xiao <yu...@gmail.com>
AuthorDate: Fri Oct 1 20:57:51 2021 +0800
HBASE-26305 Move NavigableSet add operation to writer thread in BucketCache (#3705)
Signed-off-by: Duo Zhang <zh...@apache.org>
Reviewed-by: chenglei <ch...@apache.org>
---
.../java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
index b59d19e..00c8138 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
@@ -486,7 +486,6 @@ public class BucketCache implements BlockCache, HeapSize {
} else {
this.blockNumber.increment();
this.heapSize.add(cachedItem.heapSize());
- blocksByHFile.add(cacheKey);
}
}
@@ -1027,6 +1026,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.