You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by bh...@apache.org on 2020/05/27 20:47:21 UTC
[hbase] branch branch-2.3 updated: HBASE-24423 No need to get lock
in canSplit because hasReferences will get lock too
This is an automated email from the ASF dual-hosted git repository.
bharathv pushed a commit to branch branch-2.3
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.3 by this push:
new a622bc4 HBASE-24423 No need to get lock in canSplit because hasReferences will get lock too
a622bc4 is described below
commit a622bc458b2d7c5d626927b1ca8051a72f232c44
Author: Zheng Wang <18...@qq.com>
AuthorDate: Sun May 24 20:10:17 2020 +0800
HBASE-24423 No need to get lock in canSplit because hasReferences will get lock too
Signed-off-by: Bharath Vissapragada <bh...@apache.org>
---
.../java/org/apache/hadoop/hbase/regionserver/HStore.java | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
index 6687628..f3a1222 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
@@ -2096,17 +2096,12 @@ public class HStore implements Store, HeapSize, StoreConfigInformation,
@Override
public boolean canSplit() {
- this.lock.readLock().lock();
- try {
- // Not split-able if we find a reference store file present in the store.
- boolean result = !hasReferences();
- if (!result) {
- LOG.trace("Not splittable; has references: {}", this);
- }
- return result;
- } finally {
- this.lock.readLock().unlock();
+ // Not split-able if we find a reference store file present in the store.
+ boolean result = !hasReferences();
+ if (!result) {
+ LOG.trace("Not splittable; has references: {}", this);
}
+ return result;
}
/**