HBASE-26816 Fix CME in ReplicationSourceManager (#4187)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
Xiaolin Ha 2022-03-11 11:06:14 +08:00 committed by GitHub
parent addace21b6
commit dbf56819c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -906,8 +906,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");
}
}
}