apache / incubator-horaedb-meta

Meta service of HoraeDB cluster.
https://horaedb.apache.org
Apache License 2.0
27 stars 15 forks source link

fix: fix update cluster view when shardinfos is empty #160

Closed ZuLiangWang closed 1 year ago

ZuLiangWang commented 1 year ago

Which issue does this PR close?

Closes #

Rationale for this change

When testing locally, it is found that shardNodes cannot be updated normally when the shardInfo in registerNode is empty.

What changes are included in this PR?

  1. Fix the bug that clusterView cannot be updated normally when the node is registered.

Are there any user-facing changes?

None.

How does this change test

All unit tests pass, and local validation is correct.

codecov-commenter commented 1 year ago

Codecov Report

Merging #160 (42f18e2) into main (494e15e) will increase coverage by 0.92%. The diff coverage is 34.79%.

@@            Coverage Diff             @@
##             main     #160      +/-   ##
==========================================
+ Coverage   39.07%   40.00%   +0.92%     
==========================================
  Files          33       33              
  Lines        4217     4105     -112     
==========================================
- Hits         1648     1642       -6     
+ Misses       2317     2238      -79     
+ Partials      252      225      -27     
Impacted Files Coverage Δ
server/cluster/metadata/cluster_metadata.go 0.00% <0.00%> (ø)
server/cluster/metadata/table_manager.go 0.00% <0.00%> (ø)
server/cluster/metadata/topology_manager.go 0.00% <0.00%> (ø)
server/cluster/metadata/types.go 0.00% <0.00%> (ø)
server/coordinator/procedure/manager_impl.go 0.00% <0.00%> (ø)
server/coordinator/procedure/util.go 0.00% <0.00%> (-38.89%) :arrow_down:
server/etcdutil/util.go 45.45% <0.00%> (-6.79%) :arrow_down:
server/coordinator/factory.go 4.51% <4.51%> (ø)
server/storage/storage_impl.go 62.30% <40.00%> (-1.21%) :arrow_down:
server/storage/types.go 64.82% <43.33%> (-5.74%) :arrow_down:
... and 13 more

... and 2 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.