From 6073c69d6fef6fae4e55d4bfec20d182dedf4ad8 Mon Sep 17 00:00:00 2001 From: SiCheng-Zheng Date: Tue, 23 Aug 2022 18:12:51 +0800 Subject: [PATCH] HBASE-27249 Remove invalid peer RegionServer crash --- .../hbase/replication/regionserver/ReplicationSource.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java index 2373751afbb1..3a6c526b996d 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java @@ -540,8 +540,8 @@ private void initialize() { if (!this.isSourceActive()) { setSourceStartupStatus(false); - if (Thread.currentThread().isInterrupted()) { - // If source is not running and thread is interrupted this means someone has tried to + if (Thread.currentThread().isInterrupted() || !this.sourceRunning) { + // If source is not running or thread is interrupted this means someone has tried to // remove this peer. return; } @@ -570,8 +570,8 @@ private void initialize() { if (!this.isSourceActive()) { setSourceStartupStatus(false); - if (Thread.currentThread().isInterrupted()) { - // If source is not running and thread is interrupted this means someone has tried to + if (Thread.currentThread().isInterrupted() || !this.sourceRunning) { + // If source is not running or thread is interrupted this means someone has tried to // remove this peer. return; }