Skip to content

Commit

Permalink
HBASE-24423 No need to get lock in canSplit because hasReferences wil…
Browse files Browse the repository at this point in the history
…l get lock too
  • Loading branch information
bsglz authored and bharathv committed May 26, 2020
1 parent 285e59a commit 29c59c0
Showing 1 changed file with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2061,17 +2061,12 @@ int versionsToReturn(final int wantedVersions) {

@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;
}

/**
Expand Down

0 comments on commit 29c59c0

Please sign in to comment.