Repository navigation
Conversation
Automated Reviewer SuggestionsBased on the
|
Backport auto-label reportThis
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 379 | 0.231 | 25,555/32,762/32,762 us | 🔴 +14.9% / 🔴 +109.1% |
| 🔴 | bs=100 sw=10 sl=64 | 795 | 0.485 | 123,208/172,755/172,755 us | 🔴 +9.7% / 🔴 +61.7% |
| ⚪ | bs=1000 sw=10 sl=64 | 924 | 0.564 | 1,069,077/1,184,436/1,184,436 us | ⚪ within ±5% / 🔴 +15.7% |
Baseline details
Latest main 9cf43f2 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 379 tuples/sec | 406 tuples/sec | 782.27 tuples/sec | -6.7% | -51.6% |
| bs=10 sw=10 sl=64 | MB/s | 0.231 MB/s | 0.248 MB/s | 0.477 MB/s | -6.9% | -51.6% |
| bs=10 sw=10 sl=64 | p50 | 25,555 us | 22,245 us | 12,538 us | +14.9% | +103.8% |
| bs=10 sw=10 sl=64 | p95 | 32,762 us | 36,011 us | 15,667 us | -9.0% | +109.1% |
| bs=10 sw=10 sl=64 | p99 | 32,762 us | 36,011 us | 19,058 us | -9.0% | +71.9% |
| bs=100 sw=10 sl=64 | throughput | 795 tuples/sec | 817 tuples/sec | 1,010 tuples/sec | -2.7% | -21.3% |
| bs=100 sw=10 sl=64 | MB/s | 0.485 MB/s | 0.499 MB/s | 0.616 MB/s | -2.8% | -21.3% |
| bs=100 sw=10 sl=64 | p50 | 123,208 us | 118,805 us | 100,043 us | +3.7% | +23.2% |
| bs=100 sw=10 sl=64 | p95 | 172,755 us | 157,490 us | 106,848 us | +9.7% | +61.7% |
| bs=100 sw=10 sl=64 | p99 | 172,755 us | 157,490 us | 121,073 us | +9.7% | +42.7% |
| bs=1000 sw=10 sl=64 | throughput | 924 tuples/sec | 938 tuples/sec | 1,041 tuples/sec | -1.5% | -11.2% |
| bs=1000 sw=10 sl=64 | MB/s | 0.564 MB/s | 0.572 MB/s | 0.635 MB/s | -1.4% | -11.2% |
| bs=1000 sw=10 sl=64 | p50 | 1,069,077 us | 1,057,550 us | 980,364 us | +1.1% | +9.0% |
| bs=1000 sw=10 sl=64 | p95 | 1,184,436 us | 1,187,212 us | 1,023,796 us | -0.2% | +15.7% |
| bs=1000 sw=10 sl=64 | p99 | 1,184,436 us | 1,187,212 us | 1,046,281 us | -0.2% | +13.2% |
Raw CSV
config_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,527.67,200,128000,379,0.231,25555.04,32762.42,32762.42
1,100,10,64,20,2517.10,2000,1280000,795,0.485,123208.28,172754.98,172754.98
2,1000,10,64,20,21645.08,20000,12800000,924,0.564,1069077.44,1184435.62,1184435.62
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #8126 +/- ##
============================================
- Coverage 92.61% 92.61% -0.01%
+ Complexity 5061 5059 -2
============================================
Files 1258 1258
Lines 53778 53783 +5
Branches 6706 6709 +3
============================================
+ Hits 49808 49809 +1
Misses 2316 2316
- Partials 1654 1658 +4
*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:
|
|
@aglinxinyuan Do you want to chime in? |
aglinxinyuan
left a comment
There was a problem hiding this comment.
LGTM — right fix, and the loop e2e passing confirms it. Two small doc asks inline.
| # and never mutates the State it is handed. | ||
| for key, value in state.items(): | ||
| if key in self.state: | ||
| raise ValueError(f"Loop state variable cannot be overwritten: '{key}'") |
There was a problem hiding this comment.
With the back-edge stamped, this only sees outside state — nice. One note for the PR body: outside state can still add new loop variables, just not overwrite them.
| # The back-edge fires only after the matching LoopEnd consumed at | ||
| # loop_counter == 0, so the next iteration's input starts at depth 0. | ||
| writer.put_one(executor.state.to_tuple(0)) | ||
| writer.put_one(executor.state.to_tuple(0, self._loop_start_id)) |
There was a problem hiding this comment.
Stamping the back-edge is the key move — it's what makes the rest safe. LGTM.
| # This is this LoopStart's own back-edge state. Restore the loop | ||
| # variables directly instead of routing the state through | ||
| # process_state(), which is reserved for external/first-entry state. | ||
| executor.state = state |
There was a problem hiding this comment.
This replaces the state instead of merging it, so a variable deleted in update stays deleted next iteration. I think that's better than before — just mention it in the PR body. Optional: merge the two stamped branches into one if/else.
|
It's not a fix. It's a change to the original behavior. |
|
Thanks for the review! Updated the PR description to clarify the external state behavior and the back-edge state replacement behavior. Also simplified the stamped LoopStart state routing. |
|
This pull request has been automatically marked as stale because it has If this PR is still relevant, please:
To exempt this PR from auto-close, a maintainer can add the |
|
This pull request has been automatically marked as stale because it has If this PR is still relevant, please:
To exempt this PR from auto-close, a maintainer can add the |
What changes were proposed in this PR?
Fixes LoopStart state variables being silently overwritten by upstream state. LoopStart now detects collisions between existing loop variables and incoming state variables and raises an error instead of overwriting the loop variable.
Upstream state can still introduce new loop variables when they do not already exist in the LoopStart state, but it cannot overwrite existing loop variables.
The loop back-edge state is now stamped with the LoopStart ID and restored directly on re-entry. This means variables removed during a loop iteration remain removed in the next iteration instead of being reintroduced.
Before:

After:

Any related issues, documentation, discussions?
Fixes #7248
How was this PR tested?
Added a unit test verifying that LoopStart rejects incoming state that attempts to overwrite an existing loop state variable.
Ran the targeted pytest test successfully: 1 passed.
Was this PR authored or co-authored using generative AI tooling?
Generated-by: ChatGPT (5.5 mini)