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 e03e4dd0262..5cbf8895156 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 @@ -5729,6 +5729,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);