You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by te...@apache.org on 2017/11/01 16:26:31 UTC
hbase git commit: HBASE-19065 HRegion#bulkLoadHFiles() should wait
for concurrent Region#flush() to finish
Repository: hbase
Updated Branches:
refs/heads/branch-2 fc4110a7a -> f66afa522
HBASE-19065 HRegion#bulkLoadHFiles() should wait for concurrent Region#flush() to finish
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/f66afa52
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/f66afa52
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/f66afa52
Branch: refs/heads/branch-2
Commit: f66afa5227ad92cb812fa1947c9dc4fa0d33dbfc
Parents: fc4110a
Author: tedyu <yu...@gmail.com>
Authored: Wed Nov 1 09:26:26 2017 -0700
Committer: tedyu <yu...@gmail.com>
Committed: Wed Nov 1 09:26:26 2017 -0700
----------------------------------------------------------------------
.../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/f66afa52/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 b7e21e4..5cd27b8 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
@@ -5736,6 +5736,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);