Skip to content

fix(snapshot): replay redo checkpoints in order#312

Open
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:fix-snapshot-redo-order
Open

fix(snapshot): replay redo checkpoints in order#312
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:fix-snapshot-redo-order

Conversation

@OnlyYu1996
Copy link
Copy Markdown

Summary

  • store checkpoints skipped by revert_to() in reverse order so LIFO redo() replays the next chronological checkpoint first
  • add an end-to-end regression test covering v1 -> revert_to(v1) -> redo() -> v2 -> v3 -> v4

Fixes PlatformNetwork/bounty-challenge#53149.

Validation

  • cargo +1.90.0 fmt --package cortex-snapshot --check
  • cargo +1.90.0 test -p cortex-snapshot test_redo_after_revert_to_replays_checkpoints_in_order
  • cargo +1.90.0 test -p cortex-snapshot
  • git diff --check

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant