sunhelly commented on a change in pull request #3140:
URL: https://github.com/apache/hbase/pull/3140#discussion_r637531715



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
##########
@@ -2846,7 +2846,13 @@ protected PrepareFlushResult 
internalPrepareFlushCache(WAL wal, long myseqid,
     String s = "Finished memstore snapshotting " + this + ", syncing WAL and 
waiting on mvcc, " +
         "flushsize=" + totalSizeOfFlushableStores;
     status.setStatus(s);
-    doSyncOfUnflushedWALChanges(wal, getRegionInfo());
+
+    try {
+      doSyncOfUnflushedWALChanges(wal, getRegionInfo());
+    } catch (Throwable t) {
+      status.abort("Sync unflushed WAL changes failed: " + 
StringUtils.stringifyException(t));
+      fatalForFlushCache(t);

Review comment:
       The IOException thrown above is not caused by syncing WAL, only the sync 
failure should abort the RS as early as possible.  And if we only allow 
aborting RS in the commit step of flushing cache, there will always exit the 
circumstance that OOM kill, because all failures in the previous preparing step 
of flushing cache only aborted the flush process, all flushing can not go to 
the commit step.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to