Skip to content

Commit

Permalink
HBASE-24713 RS startup with FSHLog throws NPE after HBASE-21751 (#2125)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
gkanade authored Aug 3, 2020
1 parent 492cf10 commit 9a1bad8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ protected void doReplaceWriter(Path oldPath, Path newPath, Writer nextWriter) th
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
Expand Down

0 comments on commit 9a1bad8

Please sign in to comment.