fix(sync): stop event batch after failure - #4297
Draft
MohamadJaara wants to merge 1 commit into
Draft
Conversation
|
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #4297 +/- ##
==========================================
Coverage 61.30% 61.30%
Complexity 4022 4022
==========================================
Files 2163 2163
Lines 69467 69467
Branches 6901 6901
==========================================
Hits 42590 42590
Misses 24114 24114
Partials 2763 2763
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Intent
Prevent one failed event from amplifying side effects across the rest of an incremental-sync page.
Root cause
The worker eagerly processed every envelope with
mapbefore folding the results. If an early event failed, later events still ran, but the transaction returned failure and no event IDs were marked processed. Those later events and their side effects were then replayed with the page.Reproduction
Fix
Event processing now happens inside the existing
foldToEitherWhileRight, which stops invoking processors after the first failure. The all-or-nothing transaction boundary is preserved, and pending side effects are not flushed on a failed page.Regression coverage verifies that later events, side-effect flushing, and processed-ID marking do not run after an earlier failure.