This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.0 by this push:
new 3d49cc1 Add volatile modifier to some variables (#8443)
3d49cc1 is described below
commit 3d49cc1d22c3e789f6876790b63a2eac925d52bc
Author: 灼华 <[email protected]>
AuthorDate: Sun Aug 8 22:22:13 2021 +0800
Add volatile modifier to some variables (#8443)
---
.../apache/dubbo/rpc/cluster/router/mesh/route/MeshAppRuleListener.java | 2 +-
.../org/apache/dubbo/rpc/cluster/router/mesh/route/MeshRuleRouter.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git
a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/mesh/route/MeshAppRuleListener.java
b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/mesh/route/MeshAppRuleListener.java
index 5fa7618..387ec4c 100644
---
a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/mesh/route/MeshAppRuleListener.java
+++
b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/mesh/route/MeshAppRuleListener.java
@@ -44,7 +44,7 @@ public class MeshAppRuleListener implements
ConfigurationListener {
private final String appName;
- private VsDestinationGroup vsDestinationGroupHolder;
+ private volatile VsDestinationGroup vsDestinationGroupHolder;
public MeshAppRuleListener(String appName) {
this.appName = appName;
diff --git
a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/mesh/route/MeshRuleRouter.java
b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/mesh/route/MeshRuleRouter.java
index 2395d9d..d916385 100644
---
a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/mesh/route/MeshRuleRouter.java
+++
b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/mesh/route/MeshRuleRouter.java
@@ -59,7 +59,7 @@ public class MeshRuleRouter implements Router,
VsDestinationGroupRuleListener {
private volatile Map<String, List<Invoker<?>>> subsetMap;
- private String remoteAppName;
+ private volatile String remoteAppName;
public MeshRuleRouter(URL url) {
this.url = url;