diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java index 168cbede97f..8fb8e83e00f 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java @@ -329,7 +329,7 @@ public class FSHLog extends AbstractFSWAL { SyncFuture syncFuture = null; SafePointZigZagLatch zigzagLatch = null; long sequence = -1L; - if (this.ringBufferEventHandler != null) { + if (this.writer != null && this.ringBufferEventHandler != null) { // Get sequence first to avoid dead lock when ring buffer is full // Considering below sequence // 1. replaceWriter is called and zigzagLatch is initialized