Skip to content

feat(procedure): support to rollback#3625

Merged
fengjiachun merged 14 commits intoGreptimeTeam:mainfrom
WenyXu:feat/procedure-rollback
Apr 8, 2024
Merged

feat(procedure): support to rollback#3625
fengjiachun merged 14 commits intoGreptimeTeam:mainfrom
WenyXu:feat/procedure-rollback

Conversation

@WenyXu
Copy link
Copy Markdown
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 requested review from evenyag and fengjiachun April 1, 2024 08:49
@WenyXu WenyXu force-pushed the feat/procedure-rollback branch from 548fa96 to 51a5103 Compare April 1, 2024 08:50
@WenyXu WenyXu marked this pull request as draft April 1, 2024 08:53
@codecov
Copy link
Copy Markdown

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
@WenyXu WenyXu requested a review from MichaelScofield April 3, 2024 06:54
Comment thread src/common/procedure/src/watcher.rs
Comment thread src/common/procedure/src/store.rs Outdated
Comment thread src/common/procedure/src/procedure.rs Outdated
Comment thread src/common/procedure/src/procedure.rs
Comment thread src/common/procedure/src/procedure.rs Outdated
Comment thread src/common/procedure/src/local/runner.rs Outdated
@WenyXu WenyXu requested a review from evenyag April 8, 2024 05:59
Comment thread src/common/procedure/src/procedure.rs Outdated
Comment thread src/common/procedure/src/local.rs Outdated
@WenyXu WenyXu force-pushed the feat/procedure-rollback branch from f18c726 to 5e949a1 Compare April 8, 2024 08:59
Comment thread Cargo.toml Outdated
Comment thread src/common/procedure/src/local.rs
Comment thread src/common/procedure/src/local.rs Outdated
Comment thread src/common/procedure/src/procedure.rs Outdated
Copy link
Copy Markdown
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
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.

3 participants