Skip to content

Cluster manager health v2#5784

Merged
wu-sheng merged 60 commits intoapache:masterfrom
xbkaishui:cluster-manager-health-v2
Nov 4, 2020
Merged

Cluster manager health v2#5784
wu-sheng merged 60 commits intoapache:masterfrom
xbkaishui:cluster-manager-health-v2

Conversation

@xbkaishui
Copy link
Contributor

@xbkaishui xbkaishui commented Nov 3, 2020

@wu-sheng wu-sheng added this to the 8.3.0 milestone Nov 3, 2020
@codecov
Copy link

codecov bot commented Nov 3, 2020

Codecov Report

Merging #5784 into master will decrease coverage by 7.50%.
The diff coverage is 48.85%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #5784      +/-   ##
============================================
- Coverage     51.64%   44.13%   -7.51%     
+ Complexity     3486      448    -3038     
============================================
  Files          1642     1641       -1     
  Lines         35112    35168      +56     
  Branches       3833     4454     +621     
============================================
- Hits          18133    15521    -2612     
- Misses        16081    18726    +2645     
- Partials        898      921      +23     
Impacted Files Coverage Δ Complexity Δ
...cluster/plugin/etcd/ClusterModuleEtcdProvider.java 26.66% <0.00%> (ø) 0.00 <0.00> (-2.00)
...ap/server/cluster/plugin/etcd/EtcdCoordinator.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...in/kubernetes/ClusterModuleKubernetesProvider.java 85.71% <ø> (ø) 0.00 <0.00> (-2.00)
...uster/plugin/nacos/ClusterModuleNacosProvider.java 14.28% <0.00%> (ø) 0.00 <0.00> (-2.00)
...ary/client/healthcheck/DelegatedHealthChecker.java 60.00% <0.00%> (-15.00%) 0.00 <0.00> (-3.00)
...g/oap/server/telemetry/api/HealthCheckMetrics.java 53.84% <0.00%> (-16.16%) 0.00 <0.00> (-3.00)
...cluster/plugin/zookeeper/ZookeeperCoordinator.java 50.94% <17.24%> (-13.93%) 0.00 <0.00> (ø)
...ugin/zookeeper/ClusterModuleZookeeperProvider.java 16.66% <50.00%> (ø) 0.00 <0.00> (-3.00)
...uster/plugin/kubernetes/KubernetesCoordinator.java 62.79% <51.61%> (-22.40%) 0.00 <0.00> (ø)
.../server/cluster/plugin/nacos/NacosCoordinator.java 64.28% <52.38%> (-3.58%) 0.00 <0.00> (ø)
... and 172 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a9d756c...20015a7. Read the comment docs.

@wu-sheng wu-sheng added backend OAP backend related. feature New feature labels Nov 3, 2020
@wu-sheng wu-sheng requested a review from kezhenxu94 November 3, 2020 13:31
instance.getAddress().setSelf(true);
List<RemoteInstance> remoteInstances = new ArrayList<>(20);
try {
initHealthChecker();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THREAD_SAFETY_VIOLATION: Unprotected write. Non-private method ZookeeperCoordinator.queryRemoteNodes() indirectly writes to field this.healthChecker outside of synchronization.
Reporting because another access to the same memory occurs on a background thread, although this access may not.

private final ServiceDiscovery<RemoteInstance> serviceDiscovery;
private final ServiceCache<RemoteInstance> serviceCache;
private volatile Address selfAddress;
@Setter
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THREAD_SAFETY_VIOLATION: Unprotected write. Non-private method ZookeeperCoordinator.setHealthChecker(...) writes to field this.healthChecker outside of synchronization.
Reporting because another access to the same memory occurs on a background thread, although this access may not.

private volatile Address selfAddress;
@Setter
private HealthCheckMetrics healthChecker;
private final ModuleDefineHolder manager;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move final to following other final fields in the top of the list.

private final ServiceDiscovery<RemoteInstance> serviceDiscovery;
private final ServiceCache<RemoteInstance> serviceCache;
private volatile Address selfAddress;
@Setter
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need the setter I think. Please don't open unnecessary access.

Copy link
Member

@wu-sheng wu-sheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two code style issues, please fix them in all implementations. Others look good to me.

@xbkaishui
Copy link
Contributor Author

Greate, will fix now

@wu-sheng wu-sheng requested a review from hanahmily November 3, 2020 14:02
@xbkaishui
Copy link
Contributor Author

Done

Copy link
Member

@wu-sheng wu-sheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wu-sheng wu-sheng merged commit 56fe8a4 into apache:master Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend OAP backend related. feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add health check for Storage/Cluster management module

5 participants