Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: stop the procedure manager if a new leader is elected #2576

Merged
merged 6 commits into from
Oct 18, 2023

Conversation

WenyXu
Copy link
Member

@WenyXu WenyXu commented Oct 11, 2023

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

  1. Add a running flag to ManagerContext.
  2. Throw an error for the running procedures if Runner is stopped.
  3. Stop Procedure Manager if a new leader is elected.
  4. Start Procedure Manager if the meta server becomes a leader.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

close #1721

@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

Merging #2576 (b6f3434) into develop (9056c3a) will decrease coverage by 0.47%.
Report is 3 commits behind head on develop.
The diff coverage is 73.74%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2576      +/-   ##
===========================================
- Coverage    85.23%   84.77%   -0.47%     
===========================================
  Files          738      738              
  Lines       118249   118587     +338     
===========================================
- Hits        100794   100531     -263     
- Misses       17455    18056     +601     

src/common/procedure/src/error.rs Outdated Show resolved Hide resolved
src/common/procedure/src/local.rs Outdated Show resolved Hide resolved
src/common/procedure/src/local.rs Outdated Show resolved Hide resolved
src/common/procedure/src/local.rs Outdated Show resolved Hide resolved
src/common/procedure/src/local.rs Outdated Show resolved Hide resolved
@WenyXu WenyXu force-pushed the feat/meta-procedure-stop branch from 3b59782 to e5ee291 Compare October 13, 2023 03:00
@WenyXu
Copy link
Member Author

WenyXu commented Oct 13, 2023

@fengjiachun @evenyag PTAL

src/cmd/src/standalone.rs Outdated Show resolved Hide resolved
src/common/procedure/src/error.rs Outdated Show resolved Hide resolved
src/common/procedure/src/local.rs Outdated Show resolved Hide resolved
src/common/procedure/src/local.rs Outdated Show resolved Hide resolved
src/common/procedure/src/local.rs Outdated Show resolved Hide resolved
src/common/procedure/src/local/runner.rs Outdated Show resolved Hide resolved
src/common/procedure/src/local.rs Outdated Show resolved Hide resolved
src/meta-srv/src/metasrv.rs Outdated Show resolved Hide resolved
src/meta-srv/src/metasrv.rs Outdated Show resolved Hide resolved
src/meta-srv/src/metasrv.rs Outdated Show resolved Hide resolved
@WenyXu WenyXu marked this pull request as draft October 17, 2023 03:32
@WenyXu WenyXu force-pushed the feat/meta-procedure-stop branch from 009c445 to 791f37a Compare October 17, 2023 04:13
@WenyXu WenyXu force-pushed the feat/meta-procedure-stop branch from 791f37a to 6fc4078 Compare October 17, 2023 04:15
@WenyXu WenyXu marked this pull request as ready for review October 17, 2023 04:17
@WenyXu
Copy link
Member Author

WenyXu commented Oct 17, 2023

@fengjiachun @evenyag PTAL

src/meta-srv/src/metasrv.rs Show resolved Hide resolved
src/meta-srv/src/metasrv.rs Outdated Show resolved Hide resolved
@WenyXu WenyXu force-pushed the feat/meta-procedure-stop branch from c9637a2 to b6f3434 Compare October 17, 2023 10:16
@WenyXu
Copy link
Member Author

WenyXu commented Oct 17, 2023

@fengjiachun PTAL

@killme2008 killme2008 added this pull request to the merge queue Oct 18, 2023
Merged via the queue into GreptimeTeam:develop with commit dcd481e Oct 18, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suspend or cancel local running procedures when leader steps down or lagged
4 participants