HDFS-16099. Make bpServiceToActive to be volatile. (#3159)

Co-authored-by: zhangshuyan <zqingchai@gmail.com>
This commit is contained in:
zhangshuyan0 2021-07-01 23:52:21 +08:00 committed by GitHub
parent 52b9319e57
commit 9be17339eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,7 +81,7 @@ class BPOfferService {
* this can be null. If non-null, this must always refer to a member * this can be null. If non-null, this must always refer to a member
* of the {@link #bpServices} list. * of the {@link #bpServices} list.
*/ */
private BPServiceActor bpServiceToActive = null; private volatile BPServiceActor bpServiceToActive = null;
/** /**
* The list of all actors for namenodes in this nameservice, regardless * The list of all actors for namenodes in this nameservice, regardless