Skip to content

Commit 9be1733

Browse files
authored
HDFS-16099. Make bpServiceToActive to be volatile. (#3159)
Co-authored-by: zhangshuyan <zqingchai@gmail.com>
1 parent 52b9319 commit 9be1733

File tree

1 file changed

+1
-1
lines changed
  • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode

1 file changed

+1
-1
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPOfferService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class BPOfferService {
8181
* this can be null. If non-null, this must always refer to a member
8282
* of the {@link #bpServices} list.
8383
*/
84-
private BPServiceActor bpServiceToActive = null;
84+
private volatile BPServiceActor bpServiceToActive = null;
8585

8686
/**
8787
* The list of all actors for namenodes in this nameservice, regardless

0 commit comments

Comments
 (0)