HBASE-24423 No need to get lock in canSplit because hasReferences will get lock too
Signed-off-by: Bharath Vissapragada <bharathv@apache.org>
This commit is contained in:
parent
3235b568da
commit
9f12ef0772
|
@ -2160,17 +2160,12 @@ public class HStore implements Store {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canSplit() {
|
public boolean canSplit() {
|
||||||
this.lock.readLock().lock();
|
// Not split-able if we find a reference store file present in the store.
|
||||||
try {
|
boolean result = !hasReferences();
|
||||||
// Not split-able if we find a reference store file present in the store.
|
if (!result && LOG.isTraceEnabled()) {
|
||||||
boolean result = !hasReferences();
|
LOG.trace(String.format("Not splittable; has references: %s", this));
|
||||||
if (!result && LOG.isDebugEnabled()) {
|
|
||||||
LOG.debug("Cannot split region due to reference files being there");
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
} finally {
|
|
||||||
this.lock.readLock().unlock();
|
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue