radondb / xenon

The MySQL Cluster Autopilot Management with GTID and Raft
GNU General Public License v3.0
696 stars 162 forks source link

server: add -r option on startup to specify the initial role #126

Closed dbkernel closed 3 years ago

dbkernel commented 3 years ago

We don't want to affect MySQL services when we upgrade xenon, so after the upgrade need to let the old LEADER continue to run as the LEADER and skip leaderStartShellCommand.

codecov[bot] commented 3 years ago

Codecov Report

Merging #126 (44725d4) into master (6649cea) will decrease coverage by 0%. The diff coverage is 95%.

:exclamation: Current head 44725d4 differs from pull request most recent head 809a19a. Consider uploading reports for the commit 809a19a to get more accurate results Impacted file tree graph

@@          Coverage Diff          @@
##           master   #126   +/-   ##
=====================================
- Coverage      68%    68%   -1%     
=====================================
  Files          48     48           
  Lines        3721   3742   +21     
=====================================
+ Hits         2533   2547   +14     
- Misses        954    960    +6     
- Partials      234    235    +1     
Impacted Files Coverage Δ
src/mysql/api.go 61% <0%> (-1%) :arrow_down:
src/raft/leader.go 84% <80%> (-2%) :arrow_down:
src/config/config.go 80% <100%> (+<1%) :arrow_up:
src/raft/mock.go 83% <100%> (+<1%) :arrow_up:
src/raft/raft.go 84% <100%> (+1%) :arrow_up:
src/server/mock.go 100% <100%> (ø)
src/server/server.go 51% <100%> (ø)
src/raft/candidate.go 83% <0%> (-1%) :arrow_down:

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 6649cea...809a19a. Read the comment docs.

andyli029 commented 3 years ago

Xenon Coverage / Coverage Failed. @drdstech

dbkernel commented 3 years ago

push update:
fix TestRaftLeaderChangeToMasterError failed

andyli029 commented 3 years ago

Split the pr into several prs.

dbkernel commented 3 years ago

push update:

  1. split pr
  2. add doc and comments
andyli029 commented 3 years ago

Ping @hustjieke