@Override
  protected void handleException(Throwable t) {
    if (t instanceof InterruptedIOException || t instanceof InterruptedException) {
      LOG.error("Caught throwable while processing event " + eventType, t);
    } else if (t instanceof RuntimeException) {
      server.abort("Server aborting", t);
    } else {
      // something fishy since we cannot flush the primary region until all retries (retries from
      // rpc times 35 trigger). We cannot close the region since there is no such mechanism to
      // close a region without master triggering it. We just abort the server for now.
      server.abort("ServerAborting because an exception was thrown", t);
    }
  }
HBASE-11580: With the async wal approach (HBASE-11568), the edits are not persisted to WAL in
secondary region replicas. This means that a secondary region replica can serve some edits from
it's memstore that are still not flushed from primary. We do not want to allow secondary region's
seqId to go back in time, when this secondary region is opened elsewhere after a crash or region
move. We will trigger a flush cache in the primary region replica and wait for observing a
complete flush cycle before marking the region readsEnabled. This handler does the flushing of
the primary region replica and ensures that regular region opening is not blocked while the
secondary replica is blocked on flush.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/RegionReplicaFlushHandler.java