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(procedure): support to rollback #3625

Merged
merged 14 commits into from
Apr 8, 2024

Conversation

WenyXu
Copy link
Member

@WenyXu WenyXu commented Apr 1, 2024

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

What's changed and what's your intention?

Support to rollback failed procedures

  1. Add the rollback method to the Procedure trait, the method requires an idempotent implementation.
  2. Add CommitRollback, RollingBack states to ProcedureState.
  3. Rollback procedures during the recovering.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Apr 1, 2024
@WenyXu WenyXu marked this pull request as draft April 1, 2024 08:53
Copy link

codecov bot commented Apr 1, 2024

Codecov Report

Attention: Patch coverage is 90.04329% with 46 lines in your changes are missing coverage. Please review.

Project coverage is 84.85%. Comparing base (9038e1b) to head (44011de).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3625      +/-   ##
==========================================
- Coverage   85.12%   84.85%   -0.27%     
==========================================
  Files         946      946              
  Lines      157735   158035     +300     
==========================================
- Hits       134277   134106     -171     
- Misses      23458    23929     +471     

@WenyXu WenyXu force-pushed the feat/procedure-rollback branch 2 times, most recently from fb8c8a6 to d773510 Compare April 2, 2024 09:48
@WenyXu WenyXu marked this pull request as ready for review April 2, 2024 09:53
@WenyXu WenyXu force-pushed the feat/procedure-rollback branch 2 times, most recently from 42a2a23 to cab8e3d Compare April 3, 2024 06:52
src/common/procedure/src/watcher.rs Outdated Show resolved Hide resolved
src/common/procedure/src/store.rs Outdated Show resolved Hide resolved
src/common/procedure/src/procedure.rs Outdated Show resolved Hide resolved
src/common/procedure/src/procedure.rs Outdated Show resolved Hide resolved
src/common/procedure/src/procedure.rs Outdated Show resolved Hide resolved
src/common/procedure/src/local/runner.rs Outdated Show resolved Hide resolved
@WenyXu WenyXu requested a review from evenyag April 8, 2024 05:59
src/common/procedure/src/procedure.rs Outdated Show resolved Hide resolved
src/common/procedure/src/local.rs Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
src/common/procedure/src/local.rs Show resolved Hide resolved
src/common/procedure/src/local.rs Outdated Show resolved Hide resolved
src/common/procedure/src/procedure.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@fengjiachun fengjiachun left a comment

Choose a reason for hiding this comment

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

LGTM

@fengjiachun fengjiachun added this pull request to the merge queue Apr 8, 2024
Merged via the queue into GreptimeTeam:main with commit 32b9639 Apr 8, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants