From a1acbb8ab647267248a599b7d642bcd00e4df116 Mon Sep 17 00:00:00 2001 From: ddupg Date: Wed, 12 Aug 2020 15:20:41 +0800 Subject: [PATCH] HBASE-24871 Replication may loss data when refresh recovered replication sources --- .../replication/regionserver/ReplicationSourceManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java index 2cf91ed65b59..3667d550a318 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java @@ -516,7 +516,7 @@ public void refreshSources(String peerId) throws IOException { ReplicationSourceInterface replicationSource = createSource(queueId, peer); this.oldsources.add(replicationSource); for (SortedSet walsByGroup : walsByIdRecoveredQueues.get(queueId).values()) { - walsByGroup.forEach(wal -> src.enqueueLog(new Path(wal))); + walsByGroup.forEach(wal -> replicationSource.enqueueLog(new Path(wal))); } toStartup.add(replicationSource); }