Skip to content

Fix share sync update loss on flush failure#364

Open
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:codex/fix-share-sync-requeue-on-failure
Open

Fix share sync update loss on flush failure#364
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:codex/fix-share-sync-requeue-on-failure

Conversation

@OnlyYu1996
Copy link
Copy Markdown

Summary

  • requeue the failed sync update plus any not-yet-sent updates when ShareSync::flush() hits a send error
  • preserve successful sends so already-flushed updates are not retried
  • add a regression test that simulates a mid-flush connection failure and verifies pending updates remain queued

Fixes PlatformNetwork/bounty-challenge#53166

Verification

  • cargo fmt --package cortex-share --check
  • cargo test --package cortex-share sync::tests::test_flush_requeues_failed_and_unsent_updates -- --nocapture
  • cargo test --package cortex-share -- --nocapture
  • cargo check --package cortex-share --lib
  • 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