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 532ce72 perf:The access permission and variable visibility are
unreasonable (#8154)
532ce72 is described below
commit 532ce72f8377abf8ff659430b86e0919c9aff562
Author: Xiong, Pin <[email protected]>
AuthorDate: Mon Jun 28 06:22:44 2021 -0500
perf:The access permission and variable visibility are unreasonable (#8154)
1. update the access permission of variables
2. make variables visible under multi-thread conditions
---
.../dubbo/rpc/cluster/router/mesh/route/MeshRuleRouter.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
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 3ffbd2c..9a87c7a 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
@@ -47,17 +47,17 @@ import java.util.Random;
public class MeshRuleRouter implements Router, VsDestinationGroupRuleListener {
- protected int priority = -500;
- protected boolean force = false;
- protected URL url;
+ private int priority = -500;
+ private boolean force = false;
+ private URL url;
- private VsDestinationGroup vsDestinationGroup;
+ private volatile VsDestinationGroup vsDestinationGroup;
private Map<String, String> sourcesLabels = new HashMap<>();
- protected List<Invoker<?>> invokerList = new ArrayList<>();
+ private volatile List<Invoker<?>> invokerList = new ArrayList<>();
- Map<String, List<Invoker<?>>> subsetMap;
+ private volatile Map<String, List<Invoker<?>>> subsetMap;
private String remoteAppName;