hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [6/6] hbase git commit: HBASE-19442 Backport HBASE-19065 to branch-1 (HRegion#bulkLoadHFiles() should wait for concurrent Region#flush() to finish).
Date Wed, 06 Dec 2017 22:29:51 GMT
HBASE-19442 Backport HBASE-19065 to branch-1 (HRegion#bulkLoadHFiles() should wait for concurrent
Region#flush() to finish).

Signed-off-by: Andrew Purtell <apurtell@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/fda742b3
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/fda742b3
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/fda742b3

Branch: refs/heads/branch-1.4
Commit: fda742b35b58cdac40e4b0c1891625346a2f9d47
Parents: 48b41c4
Author: Pankaj Kumar <pankaj.kr@huawei.com>
Authored: Thu Dec 7 01:59:20 2017 +0800
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Wed Dec 6 14:18:57 2017 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hbase/regionserver/HRegion.java  | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/fda742b3/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index 129e01d..92e8ef7 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -5783,6 +5783,10 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver,
Regi
           seqId = ((FlushResultImpl)fs).flushSequenceId;
         } else if (fs.getResult() == FlushResult.Result.CANNOT_FLUSH_MEMSTORE_EMPTY) {
           seqId = ((FlushResultImpl)fs).flushSequenceId;
+        } else if (fs.getResult() == FlushResult.Result.CANNOT_FLUSH) {
+          // CANNOT_FLUSH may mean that a flush is already on-going
+          // we need to wait for that flush to complete
+          waitForFlushes();
         } else {
           throw new IOException("Could not bulk load with an assigned sequential ID because
the "+
             "flush didn't run. Reason for not flushing: " + ((FlushResultImpl)fs).failureReason);


Mime
View raw message