Repository navigation
fix(pyamber): keep peek side effect free - #8960
Conversation
|
/request-review @mengw15 |
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8960 +/- ##
============================================
+ Coverage 91.81% 91.92% +0.10%
Complexity 5020 5020
============================================
Files 1277 1277
Lines 56369 57762 +1393
Branches 7359 7505 +146
============================================
+ Hits 51758 53100 +1342
- Misses 2758 2828 +70
+ Partials 1853 1834 -19
*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 | 563 | 0.344 | 16,931/22,185/22,185 us | 🔴 +10.2% / 🔴 +56.4% |
| ⚪ | bs=100 sw=10 sl=64 | 1,259 | 0.768 | 78,377/103,099/103,099 us | ⚪ within ±5% / 🟢 -12.8% |
| 🔴 | bs=1000 sw=10 sl=64 | 1,444 | 0.881 | 686,000/817,032/817,032 us | 🔴 +9.7% / 🟢 -21.5% |
Baseline details
Latest main 1ec692c from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 563 tuples/sec | 613 tuples/sec | 880.16 tuples/sec | -8.2% | -36.0% |
| bs=10 sw=10 sl=64 | MB/s | 0.344 MB/s | 0.374 MB/s | 0.537 MB/s | -8.0% | -36.0% |
| bs=10 sw=10 sl=64 | p50 | 16,931 us | 15,368 us | 11,544 us | +10.2% | +46.7% |
| bs=10 sw=10 sl=64 | p95 | 22,185 us | 23,838 us | 14,186 us | -6.9% | +56.4% |
| bs=10 sw=10 sl=64 | p99 | 22,185 us | 23,838 us | 17,122 us | -6.9% | +29.6% |
| bs=100 sw=10 sl=64 | throughput | 1,259 tuples/sec | 1,246 tuples/sec | 1,151 tuples/sec | +1.0% | +9.4% |
| bs=100 sw=10 sl=64 | MB/s | 0.768 MB/s | 0.761 MB/s | 0.703 MB/s | +0.9% | +9.3% |
| bs=100 sw=10 sl=64 | p50 | 78,377 us | 76,971 us | 89,900 us | +1.8% | -12.8% |
| bs=100 sw=10 sl=64 | p95 | 103,099 us | 101,970 us | 96,346 us | +1.1% | +7.0% |
| bs=100 sw=10 sl=64 | p99 | 103,099 us | 101,970 us | 110,344 us | +1.1% | -6.6% |
| bs=1000 sw=10 sl=64 | throughput | 1,444 tuples/sec | 1,457 tuples/sec | 1,189 tuples/sec | -0.9% | +21.4% |
| bs=1000 sw=10 sl=64 | MB/s | 0.881 MB/s | 0.889 MB/s | 0.726 MB/s | -0.9% | +21.4% |
| bs=1000 sw=10 sl=64 | p50 | 686,000 us | 683,759 us | 873,675 us | +0.3% | -21.5% |
| bs=1000 sw=10 sl=64 | p95 | 817,032 us | 744,496 us | 918,440 us | +9.7% | -11.0% |
| bs=1000 sw=10 sl=64 | p99 | 817,032 us | 744,496 us | 953,075 us | +9.7% | -14.3% |
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,354.93,200,128000,563,0.344,16931.02,22185.38,22185.38
1,100,10,64,20,1588.87,2000,1280000,1259,0.768,78377.02,103099.12,103099.12
2,1000,10,64,20,13854.17,20000,12800000,1444,0.881,685999.83,817031.83,817031.8376d6029 to
8226eb8
Compare
|
/request-review @sshiv012 @parshimers |
sshiv012
left a comment
There was a problem hiding this comment.
LGTM @Xiao-zhen-Liu, this should be a quick review. Please check and merge this when you can
8226eb8 to
75a75cc
Compare
Backport auto-label reportThis
|
What changes were proposed in this PR?
Keep queue peeking from advancing the round-robin cursor. Scan with a local index so observing a queue does not change the next message returned by
get().The regression also starts at a nonzero cursor and calls the public
peek()while wrapping past empty and disabled queues in either order. Repeated peeks preserve the nextget()result, and an unavailable queue returnsNone.Any related issues, documentation, discussions?
Closes #8225. Replaces #8226, which the stale bot closed.
How was this PR tested?
Retested with Python 3.12 on Windows from freshly fetched upstream main
1ec692c5da. Before the implementation, the original regression and both new wraparound cases fail. Afterward, all 56 customized-queue tests pass.From
amber, withPYTHONPATH=src/main/python:The two deselected expression-evaluator tests also fail on unmodified main on Windows because object addresses in
repr()have leading zeros. No expression-evaluator code changed. Ruff lint and formatting passed for all 218 Python files.git diff --checkpassed.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Codex (GPT-6)