flow-go icon indicating copy to clipboard operation
flow-go copied to clipboard

[DataAvailability] Refactor processing pipeline for results forest

Open peterargue opened this issue 5 months ago • 1 comments

Refactor of the optimistic sync processing pipeline statemachine to make it align with the results forest.

Primary changes:

  • Refactor logic that handles abandon state updates to be asynchronous. Now the OnParentStateUpdated will only cancel the pipeline's context. Propagation of the update is done in the main goroutine after processing has shutdown. This was mainly done to avoid potential deadlocks in the results forest from recursive state updates.
  • Separate calls to abandon a pipeline from parent updates. this makes the intent clearer from the results forest perspective.
  • Rename descendsFromSealedResult to isAbandoned, and make it an atomic
  • Rename UpdateState to OnParentStateUpdated
  • Add new initial Pending state
  • Add Abandon method to core
  • Move state type into separate file
  • Fix package naming to match directory
  • Change the directory/package to optimistic_sync
  • Handle

peterargue avatar Jun 16 '25 20:06 peterargue

Codecov Report

Attention: Patch coverage is 81.78138% with 45 lines in your changes missing coverage. Please review.

Project coverage is 41.34%. Comparing base (54e9a18) to head (8e33099).

Files with missing lines Patch % Lines
...dule/executiondatasync/optimistic_sync/pipeline.go 81.61% 32 Missing and 9 partials :warning:
module/executiondatasync/optimistic_sync/state.go 75.00% 4 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7514      +/-   ##
==========================================
+ Coverage   41.32%   41.34%   +0.01%     
==========================================
  Files        2237     2238       +1     
  Lines      196615   196621       +6     
==========================================
+ Hits        81251    81291      +40     
+ Misses     108575   108546      -29     
+ Partials     6789     6784       -5     
Flag Coverage Δ
unittests 41.34% <81.78%> (+0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov-commenter avatar Jun 16 '25 20:06 codecov-commenter