Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

refactor: refactor cluster #157

Merged
merged 11 commits into from
Apr 20, 2023
Merged

refactor: refactor cluster #157

merged 11 commits into from
Apr 20, 2023

Conversation

ZuLiangWang
Copy link
Contributor

Which issue does this PR close?

Closes #145

Rationale for this change

As mentioned in the issue, refactor the current cluster module to achieve a more reliable cluster mode.

What changes are included in this PR?

  1. Refactor scheduler module, based on the new interaction model, use scheduler to manage the creation of procedures.
  2. Refactor procedure manager, support executing procedures in shard-level serial manner. (Need to support scenarios where one procedure is associated with multiple shards.)
  3. Refactor all types of procedures to remove internal modifications to shard metadata and instead update them through heartbeat.

Are there any user-facing changes?

None.

How does this change test

Pass all unit tests and local integration test in CeresDB.

@codecov-commenter
Copy link

Codecov Report

Merging #157 (3e6d4e4) into main (494e15e) will increase coverage by 1.16%.
The diff coverage is 35.29%.

@@            Coverage Diff             @@
##             main     #157      +/-   ##
==========================================
+ Coverage   39.07%   40.24%   +1.16%     
==========================================
  Files          33       33              
  Lines        4217     4135      -82     
==========================================
+ Hits         1648     1664      +16     
+ Misses       2317     2236      -81     
+ Partials      252      235      -17     
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%) ⬇️
server/etcdutil/util.go 45.45% <0.00%> (-6.79%) ⬇️
server/coordinator/factory.go 4.51% <4.51%> (ø)
server/storage/storage_impl.go 62.30% <40.00%> (-1.21%) ⬇️
server/storage/types.go 64.82% <43.33%> (-5.74%) ⬇️
... 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.

Copy link
Member

@ShiKaiWi ShiKaiWi left a comment

Choose a reason for hiding this comment

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

LGTM

@ShiKaiWi ShiKaiWi merged commit d1b7436 into main Apr 20, 2023
@ShiKaiWi ShiKaiWi deleted the refactor_cluster branch April 20, 2023 12:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking issue: refactor cluster mode
3 participants