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 276902e4de1..63f4029b1f6 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