feat(pyamber): isolate tuple copy storage - #8271
Conversation
Automated Reviewer SuggestionsBased on the
|
Backport auto-label reportThis
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8271 +/- ##
============================================
- Coverage 93.93% 93.90% -0.04%
+ Complexity 4762 4761 -1
============================================
Files 1191 1191
Lines 48308 49051 +743
Branches 5377 5377
============================================
+ Hits 45380 46059 +679
- Misses 1494 1557 +63
- Partials 1434 1435 +1
*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:
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 418 | 0.255 | 23,649/30,238/30,238 us | 🔴 +29.2% / 🔴 +94.1% |
| 🔴 | bs=100 sw=10 sl=64 | 937 | 0.572 | 106,179/122,680/122,680 us | 🟢 -11.2% / 🔴 +14.4% |
| ⚪ | bs=1000 sw=10 sl=64 | 1,094 | 0.668 | 913,619/1,058,786/1,058,786 us | ⚪ within ±5% / 🟢 -7.0% |
Baseline details
Latest main 50321e4 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 418 tuples/sec | 468 tuples/sec | 787.98 tuples/sec | -10.7% | -47.0% |
| bs=10 sw=10 sl=64 | MB/s | 0.255 MB/s | 0.285 MB/s | 0.481 MB/s | -10.5% | -47.0% |
| bs=10 sw=10 sl=64 | p50 | 23,649 us | 18,299 us | 12,593 us | +29.2% | +87.8% |
| bs=10 sw=10 sl=64 | p95 | 30,238 us | 31,734 us | 15,579 us | -4.7% | +94.1% |
| bs=10 sw=10 sl=64 | p99 | 30,238 us | 31,734 us | 18,786 us | -4.7% | +61.0% |
| bs=100 sw=10 sl=64 | throughput | 937 tuples/sec | 988 tuples/sec | 1,008 tuples/sec | -5.2% | -7.0% |
| bs=100 sw=10 sl=64 | MB/s | 0.572 MB/s | 0.603 MB/s | 0.615 MB/s | -5.1% | -7.0% |
| bs=100 sw=10 sl=64 | p50 | 106,179 us | 100,810 us | 100,701 us | +5.3% | +5.4% |
| bs=100 sw=10 sl=64 | p95 | 122,680 us | 138,141 us | 107,244 us | -11.2% | +14.4% |
| bs=100 sw=10 sl=64 | p99 | 122,680 us | 138,141 us | 116,122 us | -11.2% | +5.6% |
| bs=1000 sw=10 sl=64 | throughput | 1,094 tuples/sec | 1,074 tuples/sec | 1,042 tuples/sec | +1.9% | +5.0% |
| bs=1000 sw=10 sl=64 | MB/s | 0.668 MB/s | 0.655 MB/s | 0.636 MB/s | +2.0% | +5.0% |
| bs=1000 sw=10 sl=64 | p50 | 913,619 us | 928,660 us | 981,959 us | -1.6% | -7.0% |
| bs=1000 sw=10 sl=64 | p95 | 1,058,786 us | 1,035,854 us | 1,023,080 us | +2.2% | +3.5% |
| bs=1000 sw=10 sl=64 | p99 | 1,058,786 us | 1,035,854 us | 1,051,697 us | +2.2% | +0.7% |
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,478.13,200,128000,418,0.255,23648.98,30237.82,30237.82
1,100,10,64,20,2134.97,2000,1280000,937,0.572,106179.47,122679.60,122679.60
2,1000,10,64,20,18278.07,20000,12800000,1094,0.668,913618.62,1058785.52,1058785.52
What changes were proposed in this PR?
Give a tuple constructed from another tuple its own shallow field mapping. The initial field values remain the same, but later assignments no longer mutate the other tuple.
Any related issues, documentation, discussions?
Closes #8270
How was this PR tested?
The untouched live probe reported
original_x=2,derived_x=2, andsame_storage=Trueafter editing only the derived tuple. After the fix, independent edits remain isolated andsame_storage=False.C:\Users\carlo\texera\texera\.venv312\Scripts\python.exe -c "import sys,pytest; sys.path[:0]=[r'C:\Users\carlo\texera\texera-worktrees\investigate-bug71\amber\src\main\python',r'C:\Users\carlo\texera\texera\amber\src\main\python']; raise SystemExit(pytest.main([r'amber/src/test/python/core/models/test_tuple.py','-q','-k','not test_hash','-p','no:cacheprovider']))"Result: 102 passed and 2 deselected. The excluded upstream Windows timestamp hash tests are covered by PR #8174.
C:\Users\carlo\texera\texera\.venv312\Scripts\ruff.exe check amber/src/main/python amber/src/test/pythonC:\Users\carlo\texera\texera\.venv312\Scripts\ruff.exe format --check amber/src/main/python/core/models/tuple.py amber/src/test/python/core/models/test_tuple.pyWas this PR authored or co-authored using generative AI tooling?
Generated-by: Codex