Skip to content

Copy Planning Timeout#419

Open
lightsighter wants to merge 4 commits intomainfrom
mbauer-planning-timeout
Open

Copy Planning Timeout#419
lightsighter wants to merge 4 commits intomainfrom
mbauer-planning-timeout

Conversation

@lightsighter
Copy link
Copy Markdown
Contributor

Summary

  • Modified TransferDesc::perform_analysis to accept a TimeLimit parameter and return a bool indicating whether analysis completed (true) or timed out (false)
  • Added incremental state members (analysis_init_done, analysis_field_idx, analysis_fld_start, analysis_fill_ofs, analysis_field_done) to TransferDesc so that a timed-out analysis can be resumed from where it left off without recomputing prior work
  • Pre-loop initialization (profiling setup, fill data allocation, dimension ordering, field resizing) is guarded by analysis_init_done and only runs once across calls
  • The main field loop checks work_until.is_expired() at each iteration, saving progress and returning false if the time limit is reached
  • Both existing callsites updated: check_analysis_preconditions passes an unbounded TimeLimit(), and DeferredAnalysis::event_triggered forwards its work_until parameter (previously ignored per the // TODO: respect time limit comment)

…time limit so that it can timeout in the future and then resume later, currently we do not use this functionality but we will in the bgwork copy planning branch
@lightsighter lightsighter requested review from eddy16112 and muraj April 7, 2026 17:46
@lightsighter lightsighter self-assigned this Apr 7, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 7, 2026

Codecov Report

❌ Patch coverage is 82.45614% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 29.32%. Comparing base (f337379) to head (6bfbeff).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
tests/unit_tests/perform_analysis_test.cc 83.05% 10 Missing ⚠️
src/realm/transfer/transfer.cc 83.33% 7 Missing and 2 partials ⚠️
src/realm/transfer/transfer.inl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #419      +/-   ##
==========================================
+ Coverage   29.07%   29.32%   +0.24%     
==========================================
  Files         194      195       +1     
  Lines       40229    40312      +83     
  Branches    14458    14493      +35     
==========================================
+ Hits        11697    11820     +123     
+ Misses      27598    27582      -16     
+ Partials      934      910      -24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it 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

Development

Successfully merging this pull request may close these issues.

1 participant