Skip to content

Commit a9fddff

Browse files
authored
HBASE-28076 NPE on initialization error in RecoveredReplicationSourceShipper (#5397)
Signed-off-by: Viraj Jasani <vjasani@apache.org>
1 parent 3b34bc2 commit a9fddff

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSourceShipper.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,10 @@ private void terminate(String reason, Exception cause) {
9797
"Closing worker for wal group " + this.walGroupId + " because an error occurred: " + reason,
9898
cause);
9999
}
100-
entryReader.interrupt();
101-
Threads.shutdown(entryReader, sleepForRetries);
100+
if (entryReader != null) {
101+
entryReader.interrupt();
102+
Threads.shutdown(entryReader, sleepForRetries);
103+
}
102104
this.interrupt();
103105
Threads.shutdown(this, sleepForRetries);
104106
LOG.info("ReplicationSourceWorker {} terminated", this.getName());

0 commit comments

Comments
 (0)