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 72932ad0df.

* 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>
This commit is contained in:
gkanade 2020-08-03 10:04:55 +05:30 committed by GitHub
parent 492cf108a9
commit 9a1bad84bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -329,7 +329,7 @@ public class FSHLog extends AbstractFSWAL<Writer> {
SyncFuture syncFuture = null; SyncFuture syncFuture = null;
SafePointZigZagLatch zigzagLatch = null; SafePointZigZagLatch zigzagLatch = null;
long sequence = -1L; 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 // Get sequence first to avoid dead lock when ring buffer is full
// Considering below sequence // Considering below sequence
// 1. replaceWriter is called and zigzagLatch is initialized // 1. replaceWriter is called and zigzagLatch is initialized