hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From li...@apache.org
Subject svn commit: r1504223 - /hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
Date Wed, 17 Jul 2013 18:22:09 GMT
Author: liyin
Date: Wed Jul 17 18:22:08 2013
New Revision: 1504223

URL: http://svn.apache.org/r1504223
[HBASE-8942] [0.89-fb] fix write outliers caused by errors in DFSClient.read()

Author: aaiyer

  Remove unnecessary locking around getScanners(). We only need
  locking around the part where we get the list of store files, and the
  scanner to memstore.

  Opening the store files, and seeking the scanners can be done outside
  the lock. This is how it is implemented in
    getScanners(boolean cacheBlocks, boolean isCompaction, ScanQueryMatcher matcher)

  getScanner() seems to add one more layer of unnecessary lock.readLock().
  This is unnecessary and causes outliers, if for some reason opening the
  store files takes a long time.

Test Plan: run unit tests

Reviewers: liyintang, rshroff

Reviewed By: liyintang

CC: hbase-eng@

Differential Revision: https://phabricator.fb.com/D883650

Task ID: 2603194


Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java?rev=1504223&r1=1504222&r2=1504223&view=diff
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java (original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java Wed
Jul 17 18:22:08 2013
@@ -1778,12 +1778,7 @@ public class Store extends SchemaConfigu
   public StoreScanner getScanner(Scan scan,
       final NavigableSet<byte []> targetCols) throws IOException {
-    lock.readLock().lock();
-    try {
-      return new StoreScanner(this, scan, targetCols, getAggregator());
-    } finally {
-      lock.readLock().unlock();
-    }
+    return new StoreScanner(this, scan, targetCols, getAggregator());

View raw message