This is an automated email from the ASF dual-hosted git repository.
bbeaudreault pushed a commit to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.5 by this push:
new 87ff13d03e1 HBASE-26816 Fix CME in ReplicationSourceManager (#4187)
87ff13d03e1 is described below
commit 87ff13d03e18cb6615dd22622a70608b37bbafc3
Author: Xiaolin Ha <[email protected]>
AuthorDate: Fri Mar 11 11:06:14 2022 +0800
HBASE-26816 Fix CME in ReplicationSourceManager (#4187)
Signed-off-by: Duo Zhang <[email protected]>
---
.../hbase/replication/regionserver/ReplicationSourceManager.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
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 3f88838b7f1..cbda89ede93 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
@@ -714,8 +714,10 @@ public class ReplicationSourceManager {
for (ReplicationSourceInterface source : this.sources.values()) {
source.terminate("Region server is closing");
}
- for (ReplicationSourceInterface source : this.oldsources) {
- source.terminate("Region server is closing");
+ synchronized (oldsources) {
+ for (ReplicationSourceInterface source : this.oldsources) {
+ source.terminate("Region server is closing");
+ }
}
}