Skip to content

Commit 9a1bad8

Browse files
authored
HBASE-24713 RS startup with FSHLog throws NPE after HBASE-21751 (#2125)
* null check for writer if not initialized yet during syncrunner run * Revert "null check for writer if not initialized yet during syncrunner run" This reverts commit 72932ad. * Writer check while trying to attain safe point Signed-off-by: Anoop Sam John <anoopsamjohn@apache.com> Signed-off-by: Viraj Jasani <vjasani@apache.org> Signed-off-by: Ramkrishna <ramkrishna@apache.org>
1 parent 492cf10 commit 9a1bad8

File tree

1 file changed

+1
-1
lines changed
  • hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal

1 file changed

+1
-1
lines changed

hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ protected void doReplaceWriter(Path oldPath, Path newPath, Writer nextWriter) th
329329
SyncFuture syncFuture = null;
330330
SafePointZigZagLatch zigzagLatch = null;
331331
long sequence = -1L;
332-
if (this.ringBufferEventHandler != null) {
332+
if (this.writer != null && this.ringBufferEventHandler != null) {
333333
// Get sequence first to avoid dead lock when ring buffer is full
334334
// Considering below sequence
335335
// 1. replaceWriter is called and zigzagLatch is initialized

0 commit comments

Comments
 (0)