refactor(amber): remove redundant result-readiness wait in SyncExecutionResource#5856
refactor(amber): remove redundant result-readiness wait in SyncExecutionResource#5856bobbai00 wants to merge 1 commit into
Conversation
…ionResource Results are durably committed before COMPLETED is observable (OutputManager.closeOutputStorageWriterIfNeeded joins the result-writer thread, forcing the Iceberg commit, before the worker reports the port complete), and a failed commit surfaces as FAILED/KILLED. Both result-reading paths are gated on COMPLETED, so the two Thread.sleep(500) waits were redundant. Add an e2e spec to lock the invariant.
Automated Reviewer SuggestionsBased on the
|
✅ No material benchmark regressions detected🟢 0 better · 🔴 0 worse · ⚪ 15 noise (<±5%) · 0 without baseline
Baseline detailsLatest main
Raw CSVconfig_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,507.70,200,128000,394,0.240,24234.00,36574.80,36574.80
1,100,10,64,20,2455.00,2000,1280000,815,0.497,123217.59,137580.13,137580.13
2,1000,10,64,20,21621.11,20000,12800000,925,0.565,1082256.78,1111551.53,1111551.53 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5856 +/- ##
============================================
+ Coverage 53.64% 53.88% +0.23%
- Complexity 2720 2753 +33
============================================
Files 1099 1099
Lines 42541 42539 -2
Branches 4577 4577
============================================
+ Hits 22822 22921 +99
+ Misses 18385 18284 -101
Partials 1334 1334
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What changes were proposed in this PR?
Removes the two
Thread.sleep(500)waits inSyncExecutionResource.executeWorkflowSyncand reads results as soon as the execution reachesCOMPLETED. The wait was redundant: the engine commits each operator's result storage synchronously —OutputManager.closeOutputStorageWriterIfNeededjoins the writer thread (forcing the Iceberg commit) before the worker reportsCOMPLETED, and a failed commit surfaces asFAILED/KILLED, neverCOMPLETED. AddsResultPersistedOnCompletionSpecto lock that invariant.Any related issues, documentation, discussions?
Closes #5855
How was this PR tested?
WorkflowExecutionService/testOnly ...e2e.ResultPersistedOnCompletionSpec— 2 cases (a single source, and a multi-region scan→keyword→count DAG) that read result storage the instant the run reportsCOMPLETED(no wait) and assert the committedgetCountequals the rows actually readable. The existingOutputPortStorageWriterThreadSpeccovers the commit/failure-propagation path.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 4.8 (1M context)