diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSource.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSource.java index b615eed7d538..3dd2ead54a6a 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSource.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSource.java @@ -149,6 +149,9 @@ void tryFinish() { boolean allTasksDone = workerThreads.values().stream().allMatch(w -> w.isFinished()); if (allTasksDone) { this.getSourceMetrics().clear(); + if (this.getReplicationEndpoint() != null) { + this.getReplicationEndpoint().stop(); + } manager.removeRecoveredSource(this); LOG.info("Finished recovering queue {} with the following stats: {}", queueId, getStats()); }