Skip to content

Commit 6073c69

Browse files
author
SiCheng-Zheng
committed
HBASE-27249 Remove invalid peer RegionServer crash
1 parent a3eeab8 commit 6073c69

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -540,8 +540,8 @@ private void initialize() {
540540

541541
if (!this.isSourceActive()) {
542542
setSourceStartupStatus(false);
543-
if (Thread.currentThread().isInterrupted()) {
544-
// If source is not running and thread is interrupted this means someone has tried to
543+
if (Thread.currentThread().isInterrupted() || !this.sourceRunning) {
544+
// If source is not running or thread is interrupted this means someone has tried to
545545
// remove this peer.
546546
return;
547547
}
@@ -570,8 +570,8 @@ private void initialize() {
570570

571571
if (!this.isSourceActive()) {
572572
setSourceStartupStatus(false);
573-
if (Thread.currentThread().isInterrupted()) {
574-
// If source is not running and thread is interrupted this means someone has tried to
573+
if (Thread.currentThread().isInterrupted() || !this.sourceRunning) {
574+
// If source is not running or thread is interrupted this means someone has tried to
575575
// remove this peer.
576576
return;
577577
}

0 commit comments

Comments
 (0)