hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mbau...@apache.org
Subject svn commit: r1388797 - /hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Date Sat, 22 Sep 2012 12:50:43 GMT
Author: mbautin
Date: Sat Sep 22 12:50:43 2012
New Revision: 1388797

URL: http://svn.apache.org/viewvc?rev=1388797&view=rev
Log:
[HBASE-6857] [0.89-fb] Instrument how long flushes hold the update lock

Author: aaiyer

Summary:
Seen some coorelation between slow operations and
an occassional memstore flush.
See how long we block updates during a flush.

Test Plan: push and look for stats

Reviewers: kranganathan, kannan

Reviewed By: kannan

CC: hbase-eng@

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

Modified:
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java

Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=1388797&r1=1388796&r2=1388797&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
(original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Sat Sep 22 12:50:43 2012
@@ -1420,7 +1420,9 @@ public class HRegion implements HeapSize
     // end up in both snapshot and memstore (makes it difficult to do atomic
     // rows then)
     status.setStatus("Obtaining lock to block concurrent updates");
+    long t0, t1;
     this.updatesLock.writeLock().lock();
+    t0 = EnvironmentEdgeManager.currentTimeMillis();
     status.setStatus("Preparing to flush by snapshotting stores");
     final long currentMemStoreSize = this.memstoreSize.get();
     //copy the array of per column family memstore values
@@ -1440,6 +1442,9 @@ public class HRegion implements HeapSize
       }
     } finally {
       this.updatesLock.writeLock().unlock();
+      t1 = EnvironmentEdgeManager.currentTimeMillis();
+      LOG.debug("Finished snapshotting. Held region-wide updates lock for "
+        + (t1-t0) + " ms.");
     }
 
     status.setStatus("Flushing stores");



Mime
View raw message