You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by vj...@apache.org on 2023/09/14 23:52:20 UTC
[hbase] branch branch-2 updated: HBASE-28076 NPE on initialization error in RecoveredReplicationSourceShipper (#5397)
This is an automated email from the ASF dual-hosted git repository.
vjasani pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2 by this push:
new a9fddff001d HBASE-28076 NPE on initialization error in RecoveredReplicationSourceShipper (#5397)
a9fddff001d is described below
commit a9fddff001d5c38848741c43ef168247fbf3f777
Author: Istvan Toth <st...@apache.org>
AuthorDate: Fri Sep 15 01:52:14 2023 +0200
HBASE-28076 NPE on initialization error in RecoveredReplicationSourceShipper (#5397)
Signed-off-by: Viraj Jasani <vj...@apache.org>
---
.../replication/regionserver/RecoveredReplicationSourceShipper.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSourceShipper.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSourceShipper.java
index 471ca68f659..b01df7db849 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSourceShipper.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSourceShipper.java
@@ -97,8 +97,10 @@ public class RecoveredReplicationSourceShipper extends ReplicationSourceShipper
"Closing worker for wal group " + this.walGroupId + " because an error occurred: " + reason,
cause);
}
- entryReader.interrupt();
- Threads.shutdown(entryReader, sleepForRetries);
+ if (entryReader != null) {
+ entryReader.interrupt();
+ Threads.shutdown(entryReader, sleepForRetries);
+ }
this.interrupt();
Threads.shutdown(this, sleepForRetries);
LOG.info("ReplicationSourceWorker {} terminated", this.getName());