This is an automated email from the ASF dual-hosted git repository.
hexiaoqiao pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new 9be1733 HDFS-16099. Make bpServiceToActive to be volatile. (#3159)
9be1733 is described below
commit 9be17339eb1dfda01afe255831fac36a33141d85
Author: zhangshuyan0 <[email protected]>
AuthorDate: Thu Jul 1 23:52:21 2021 +0800
HDFS-16099. Make bpServiceToActive to be volatile. (#3159)
Co-authored-by: zhangshuyan <[email protected]>
---
.../java/org/apache/hadoop/hdfs/server/datanode/BPOfferService.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPOfferService.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPOfferService.java
index dcfbfbb..0c06199 100644
---
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPOfferService.java
+++
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPOfferService.java
@@ -81,7 +81,7 @@ class BPOfferService {
* this can be null. If non-null, this must always refer to a member
* 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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]