Skip to content

fix: ensure a maximum of buffer_len RecordBatches are cached in spawn_buffered#23560

Merged
rluvaton merged 2 commits into
apache:mainfrom
ariel-miculas:fix-23559
Jul 14, 2026
Merged

fix: ensure a maximum of buffer_len RecordBatches are cached in spawn_buffered#23560
rluvaton merged 2 commits into
apache:mainfrom
ariel-miculas:fix-23559

Conversation

@ariel-miculas

@ariel-miculas ariel-miculas commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Fixes: #23559

Rationale for this change

See the issue description

What changes are included in this PR?

Change spawn_buffered's behavior to ensure a maximum of buffer RecordBatches are produced before any consumer polls the stream.

Are these changes tested?

Yes

Are there any user-facing changes?

No

@github-actions github-actions Bot added the physical-plan Changes to the physical-plan crate label Jul 14, 2026
@rluvaton rluvaton changed the title fix: ensure a maximum of buffer_len RecordBatches are cached in spawn… fix: ensure a maximum of buffer_len RecordBatches are cached in spawn_buffered Jul 14, 2026
@rluvaton

Copy link
Copy Markdown
Member

run benchmarks

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4968096864-1045-9m556 6.12.85+ #1 SMP Mon May 11 08:17:35 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing fix-23559 (cc4945a) to 79692c1 (merge-base) diff using: tpch
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4968096864-1043-862pj 6.12.85+ #1 SMP Mon May 11 08:17:35 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing fix-23559 (cc4945a) to 79692c1 (merge-base) diff using: clickbench_partitioned
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4968096864-1044-5c872 6.12.85+ #1 SMP Mon May 11 08:17:35 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing fix-23559 (cc4945a) to 79692c1 (merge-base) diff using: tpcds
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and fix-23559
--------------------
Benchmark tpch_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                           HEAD ┃                      fix-23559 ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │ 39.00 / 40.24 ±1.64 / 43.48 ms │ 38.53 / 40.47 ±1.34 / 41.86 ms │     no change │
│ QQuery 2  │ 19.68 / 19.98 ±0.28 / 20.52 ms │ 19.75 / 20.16 ±0.25 / 20.52 ms │     no change │
│ QQuery 3  │ 31.39 / 34.23 ±1.79 / 37.03 ms │ 32.69 / 33.59 ±0.46 / 33.96 ms │     no change │
│ QQuery 4  │ 17.55 / 17.77 ±0.16 / 18.01 ms │ 17.85 / 18.84 ±0.66 / 19.52 ms │  1.06x slower │
│ QQuery 5  │ 38.35 / 40.68 ±1.20 / 41.67 ms │ 40.66 / 42.70 ±1.64 / 44.96 ms │     no change │
│ QQuery 6  │ 16.05 / 16.34 ±0.17 / 16.53 ms │ 16.21 / 16.49 ±0.25 / 16.87 ms │     no change │
│ QQuery 7  │ 43.56 / 45.68 ±1.51 / 48.15 ms │ 45.55 / 48.29 ±2.01 / 51.43 ms │  1.06x slower │
│ QQuery 8  │ 43.82 / 44.17 ±0.35 / 44.81 ms │ 42.84 / 44.03 ±1.01 / 45.90 ms │     no change │
│ QQuery 9  │ 49.51 / 50.95 ±1.06 / 52.64 ms │ 49.07 / 51.58 ±1.60 / 54.10 ms │     no change │
│ QQuery 10 │ 42.20 / 43.26 ±1.18 / 44.78 ms │ 42.15 / 42.30 ±0.13 / 42.48 ms │     no change │
│ QQuery 11 │ 13.54 / 13.74 ±0.18 / 14.04 ms │ 13.67 / 13.77 ±0.16 / 14.08 ms │     no change │
│ QQuery 12 │ 24.46 / 25.09 ±1.01 / 27.10 ms │ 23.99 / 24.75 ±1.10 / 26.90 ms │     no change │
│ QQuery 13 │ 32.31 / 34.50 ±2.08 / 38.44 ms │ 32.43 / 33.84 ±0.98 / 35.18 ms │     no change │
│ QQuery 14 │ 23.95 / 24.23 ±0.25 / 24.66 ms │ 23.56 / 24.12 ±0.39 / 24.56 ms │     no change │
│ QQuery 15 │ 31.00 / 31.87 ±0.59 / 32.81 ms │ 31.10 / 31.98 ±0.95 / 33.79 ms │     no change │
│ QQuery 16 │ 14.28 / 14.40 ±0.12 / 14.61 ms │ 14.32 / 14.49 ±0.11 / 14.62 ms │     no change │
│ QQuery 17 │ 76.35 / 77.88 ±1.37 / 80.02 ms │ 73.89 / 74.74 ±0.85 / 75.79 ms │     no change │
│ QQuery 18 │ 60.06 / 63.80 ±3.05 / 69.01 ms │ 59.39 / 60.41 ±1.39 / 63.06 ms │ +1.06x faster │
│ QQuery 19 │ 34.24 / 35.14 ±0.95 / 36.93 ms │ 33.02 / 34.30 ±1.44 / 37.01 ms │     no change │
│ QQuery 20 │ 32.76 / 33.61 ±1.04 / 35.66 ms │ 32.14 / 32.54 ±0.62 / 33.76 ms │     no change │
│ QQuery 21 │ 57.41 / 58.52 ±1.01 / 60.21 ms │ 56.03 / 57.07 ±0.86 / 58.39 ms │     no change │
│ QQuery 22 │ 14.29 / 14.62 ±0.19 / 14.82 ms │ 14.15 / 14.53 ±0.32 / 15.01 ms │     no change │
└───────────┴────────────────────────────────┴────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Benchmark Summary        ┃          ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ Total Time (HEAD)        │ 780.70ms │
│ Total Time (fix-23559)   │ 774.97ms │
│ Average Time (HEAD)      │  35.49ms │
│ Average Time (fix-23559) │  35.23ms │
│ Queries Faster           │        1 │
│ Queries Slower           │        2 │
│ Queries with No Change   │       19 │
│ Queries with Failure     │        0 │
└──────────────────────────┴──────────┘

Resource Usage

tpch — base (merge-base)

Metric Value
Wall time 5.0s
Peak memory 1.3 GiB
Avg memory 538.3 MiB
CPU user 22.7s
CPU sys 1.8s
Peak spill 0 B

tpch — branch

Metric Value
Wall time 5.0s
Peak memory 1.1 GiB
Avg memory 500.8 MiB
CPU user 22.3s
CPU sys 1.8s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and fix-23559
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃                              fix-23559 ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │           5.37 / 5.90 ±0.96 / 7.81 ms │            5.32 / 5.85 ±0.97 / 7.78 ms │     no change │
│ QQuery 2  │        80.20 / 80.76 ±0.42 / 81.43 ms │         80.88 / 81.41 ±0.41 / 82.15 ms │     no change │
│ QQuery 3  │        29.52 / 29.80 ±0.17 / 29.98 ms │         29.30 / 29.62 ±0.20 / 29.86 ms │     no change │
│ QQuery 4  │     480.69 / 484.18 ±2.49 / 487.49 ms │      484.84 / 487.60 ±2.34 / 491.20 ms │     no change │
│ QQuery 5  │        52.47 / 54.86 ±4.28 / 63.41 ms │         51.65 / 52.43 ±0.63 / 53.17 ms │     no change │
│ QQuery 6  │        36.49 / 37.00 ±0.52 / 37.81 ms │         36.26 / 36.58 ±0.25 / 37.03 ms │     no change │
│ QQuery 7  │        95.79 / 96.40 ±0.50 / 97.28 ms │         96.11 / 96.51 ±0.27 / 96.78 ms │     no change │
│ QQuery 8  │        36.74 / 38.26 ±1.88 / 41.93 ms │         36.51 / 37.02 ±0.34 / 37.44 ms │     no change │
│ QQuery 9  │        51.03 / 53.12 ±1.12 / 54.38 ms │         51.59 / 55.07 ±2.92 / 60.34 ms │     no change │
│ QQuery 10 │        63.97 / 64.35 ±0.37 / 65.06 ms │         63.46 / 63.84 ±0.43 / 64.66 ms │     no change │
│ QQuery 11 │     292.63 / 299.58 ±3.58 / 302.55 ms │      298.31 / 303.04 ±3.84 / 307.73 ms │     no change │
│ QQuery 12 │        27.86 / 28.97 ±0.76 / 30.20 ms │         28.44 / 28.87 ±0.42 / 29.66 ms │     no change │
│ QQuery 13 │     118.28 / 119.41 ±1.17 / 121.37 ms │      119.06 / 119.94 ±1.20 / 122.27 ms │     no change │
│ QQuery 14 │     412.06 / 418.88 ±4.17 / 423.32 ms │      417.20 / 420.80 ±3.75 / 427.68 ms │     no change │
│ QQuery 15 │        56.67 / 57.27 ±0.56 / 58.26 ms │         57.08 / 57.99 ±0.53 / 58.60 ms │     no change │
│ QQuery 16 │           6.66 / 6.77 ±0.14 / 7.05 ms │            6.43 / 6.57 ±0.16 / 6.89 ms │     no change │
│ QQuery 17 │        80.84 / 81.01 ±0.20 / 81.39 ms │         80.29 / 81.56 ±1.75 / 85.02 ms │     no change │
│ QQuery 18 │     126.18 / 127.51 ±1.40 / 129.22 ms │      124.04 / 125.65 ±1.20 / 127.30 ms │     no change │
│ QQuery 19 │        41.63 / 42.05 ±0.47 / 42.96 ms │         41.50 / 41.94 ±0.30 / 42.28 ms │     no change │
│ QQuery 20 │        35.29 / 35.90 ±0.46 / 36.61 ms │         35.78 / 36.83 ±1.20 / 38.97 ms │     no change │
│ QQuery 21 │        17.44 / 18.02 ±0.64 / 19.21 ms │         17.64 / 17.93 ±0.32 / 18.53 ms │     no change │
│ QQuery 22 │        63.24 / 64.18 ±1.41 / 66.97 ms │         62.95 / 63.58 ±0.54 / 64.35 ms │     no change │
│ QQuery 23 │     341.76 / 346.61 ±3.94 / 352.78 ms │      346.68 / 350.71 ±3.28 / 356.24 ms │     no change │
│ QQuery 24 │     226.55 / 228.56 ±3.14 / 234.79 ms │      225.92 / 230.44 ±4.99 / 237.90 ms │     no change │
│ QQuery 25 │     109.90 / 111.58 ±1.45 / 114.26 ms │      110.99 / 112.17 ±0.84 / 113.43 ms │     no change │
│ QQuery 26 │        57.84 / 59.27 ±2.17 / 63.59 ms │         57.93 / 59.36 ±1.98 / 63.27 ms │     no change │
│ QQuery 27 │           6.00 / 6.12 ±0.20 / 6.52 ms │            6.29 / 6.60 ±0.39 / 7.29 ms │  1.08x slower │
│ QQuery 28 │        57.75 / 60.45 ±1.46 / 62.05 ms │         61.00 / 62.10 ±0.94 / 63.83 ms │     no change │
│ QQuery 29 │       97.20 / 98.56 ±1.51 / 101.43 ms │        97.21 / 99.45 ±2.07 / 102.91 ms │     no change │
│ QQuery 30 │        32.79 / 34.90 ±2.18 / 38.97 ms │         32.46 / 33.00 ±0.37 / 33.43 ms │ +1.06x faster │
│ QQuery 31 │     111.53 / 112.26 ±0.78 / 113.59 ms │      110.51 / 112.30 ±1.28 / 114.31 ms │     no change │
│ QQuery 32 │        20.10 / 20.47 ±0.25 / 20.76 ms │         20.17 / 20.45 ±0.27 / 20.92 ms │     no change │
│ QQuery 33 │        37.32 / 37.66 ±0.26 / 37.99 ms │         37.66 / 39.65 ±3.53 / 46.70 ms │  1.05x slower │
│ QQuery 34 │         9.75 / 11.28 ±2.28 / 15.82 ms │           9.72 / 9.97 ±0.31 / 10.57 ms │ +1.13x faster │
│ QQuery 35 │        72.85 / 73.58 ±0.55 / 74.28 ms │         72.99 / 74.36 ±1.68 / 77.56 ms │     no change │
│ QQuery 36 │           5.53 / 5.65 ±0.18 / 6.01 ms │            5.57 / 5.74 ±0.18 / 6.09 ms │     no change │
│ QQuery 37 │           6.65 / 6.78 ±0.12 / 6.94 ms │            6.77 / 6.95 ±0.16 / 7.20 ms │     no change │
│ QQuery 38 │        61.96 / 62.40 ±0.27 / 62.72 ms │         61.60 / 62.62 ±0.56 / 63.30 ms │     no change │
│ QQuery 39 │        89.90 / 92.00 ±3.01 / 97.93 ms │         90.35 / 92.85 ±2.32 / 97.16 ms │     no change │
│ QQuery 40 │        24.02 / 24.43 ±0.24 / 24.72 ms │         23.26 / 23.78 ±0.42 / 24.48 ms │     no change │
│ QQuery 41 │        11.67 / 11.80 ±0.15 / 12.08 ms │         11.41 / 11.62 ±0.26 / 12.14 ms │     no change │
│ QQuery 42 │        23.92 / 24.31 ±0.27 / 24.76 ms │         23.73 / 24.38 ±0.63 / 25.52 ms │     no change │
│ QQuery 43 │           4.90 / 4.99 ±0.12 / 5.22 ms │            5.01 / 5.11 ±0.10 / 5.29 ms │     no change │
│ QQuery 44 │           9.28 / 9.39 ±0.09 / 9.55 ms │            9.29 / 9.45 ±0.20 / 9.85 ms │     no change │
│ QQuery 45 │        38.58 / 38.85 ±0.23 / 39.15 ms │         38.10 / 38.71 ±0.54 / 39.67 ms │     no change │
│ QQuery 46 │        11.75 / 11.95 ±0.19 / 12.24 ms │         11.73 / 11.84 ±0.14 / 12.06 ms │     no change │
│ QQuery 47 │     226.05 / 229.99 ±3.17 / 235.75 ms │      226.71 / 229.63 ±1.92 / 232.23 ms │     no change │
│ QQuery 48 │       96.70 / 98.90 ±3.19 / 105.22 ms │         96.47 / 97.09 ±0.82 / 98.68 ms │     no change │
│ QQuery 49 │        76.85 / 77.23 ±0.38 / 77.95 ms │         76.63 / 77.15 ±0.47 / 77.75 ms │     no change │
│ QQuery 50 │        59.75 / 61.25 ±2.70 / 66.65 ms │         59.93 / 61.78 ±2.66 / 67.05 ms │     no change │
│ QQuery 51 │        92.89 / 94.05 ±1.74 / 97.51 ms │         91.22 / 93.30 ±1.30 / 95.24 ms │     no change │
│ QQuery 52 │        23.87 / 24.20 ±0.23 / 24.48 ms │         23.95 / 24.32 ±0.25 / 24.71 ms │     no change │
│ QQuery 53 │        29.44 / 29.73 ±0.21 / 29.98 ms │         29.30 / 29.71 ±0.28 / 30.00 ms │     no change │
│ QQuery 54 │        55.21 / 58.28 ±2.60 / 62.97 ms │         55.22 / 57.26 ±2.00 / 60.13 ms │     no change │
│ QQuery 55 │        23.43 / 23.83 ±0.33 / 24.34 ms │         23.51 / 23.80 ±0.32 / 24.42 ms │     no change │
│ QQuery 56 │        39.46 / 39.98 ±0.72 / 41.38 ms │         38.63 / 39.33 ±0.50 / 40.15 ms │     no change │
│ QQuery 57 │     175.95 / 177.33 ±1.31 / 179.41 ms │      177.33 / 178.84 ±1.52 / 180.86 ms │     no change │
│ QQuery 58 │     115.92 / 117.19 ±0.74 / 117.91 ms │      115.20 / 118.13 ±3.07 / 123.68 ms │     no change │
│ QQuery 59 │     118.08 / 119.27 ±0.95 / 120.94 ms │      118.77 / 119.96 ±1.12 / 121.97 ms │     no change │
│ QQuery 60 │        39.03 / 39.95 ±0.53 / 40.43 ms │         39.65 / 40.10 ±0.36 / 40.54 ms │     no change │
│ QQuery 61 │        12.17 / 12.30 ±0.17 / 12.63 ms │         12.07 / 12.21 ±0.15 / 12.49 ms │     no change │
│ QQuery 62 │        46.76 / 48.47 ±3.12 / 54.70 ms │         46.88 / 48.77 ±2.07 / 52.64 ms │     no change │
│ QQuery 63 │        29.88 / 30.80 ±1.20 / 33.10 ms │         29.49 / 30.61 ±1.11 / 32.75 ms │     no change │
│ QQuery 64 │     411.10 / 417.53 ±6.76 / 429.65 ms │      411.20 / 417.70 ±8.12 / 432.99 ms │     no change │
│ QQuery 65 │     151.16 / 153.35 ±2.37 / 157.33 ms │      149.23 / 154.46 ±4.84 / 163.46 ms │     no change │
│ QQuery 66 │        80.27 / 83.55 ±3.81 / 90.29 ms │         80.60 / 81.22 ±0.42 / 81.78 ms │     no change │
│ QQuery 67 │     238.18 / 243.87 ±3.25 / 247.56 ms │      235.53 / 240.55 ±3.71 / 245.44 ms │     no change │
│ QQuery 68 │        11.67 / 11.89 ±0.25 / 12.38 ms │         11.82 / 12.01 ±0.15 / 12.23 ms │     no change │
│ QQuery 69 │        58.09 / 58.35 ±0.16 / 58.56 ms │         58.22 / 58.99 ±0.78 / 60.25 ms │     no change │
│ QQuery 70 │     105.48 / 108.23 ±3.05 / 113.66 ms │      106.05 / 108.69 ±2.78 / 113.25 ms │     no change │
│ QQuery 71 │        35.20 / 35.55 ±0.22 / 35.83 ms │         34.88 / 35.92 ±0.64 / 36.66 ms │     no change │
│ QQuery 72 │ 2100.22 / 2195.35 ±51.23 / 2248.48 ms │ 1959.12 / 2098.00 ±107.06 / 2224.37 ms │     no change │
│ QQuery 73 │          9.47 / 9.71 ±0.27 / 10.18 ms │           9.51 / 9.71 ±0.23 / 10.16 ms │     no change │
│ QQuery 74 │     171.22 / 174.53 ±4.96 / 184.31 ms │      169.60 / 172.99 ±2.76 / 175.83 ms │     no change │
│ QQuery 75 │     148.25 / 149.69 ±1.46 / 152.48 ms │      148.01 / 149.68 ±1.49 / 152.47 ms │     no change │
│ QQuery 76 │        35.20 / 35.65 ±0.33 / 36.14 ms │         35.26 / 37.22 ±1.83 / 40.65 ms │     no change │
│ QQuery 77 │        60.89 / 61.29 ±0.37 / 61.98 ms │         60.57 / 63.05 ±2.19 / 67.09 ms │     no change │
│ QQuery 78 │     197.09 / 201.66 ±6.05 / 213.30 ms │      196.62 / 199.75 ±1.59 / 200.87 ms │     no change │
│ QQuery 79 │        67.42 / 70.51 ±5.13 / 80.74 ms │         67.99 / 69.38 ±2.21 / 73.78 ms │     no change │
│ QQuery 80 │     100.15 / 101.59 ±1.58 / 104.51 ms │      101.30 / 102.84 ±2.54 / 107.92 ms │     no change │
│ QQuery 81 │        26.10 / 26.50 ±0.39 / 27.21 ms │         25.78 / 26.08 ±0.29 / 26.60 ms │     no change │
│ QQuery 82 │        16.35 / 16.64 ±0.25 / 17.00 ms │         16.37 / 16.47 ±0.09 / 16.63 ms │     no change │
│ QQuery 83 │        39.99 / 42.93 ±4.99 / 52.91 ms │         39.54 / 41.69 ±3.60 / 48.88 ms │     no change │
│ QQuery 84 │        30.71 / 31.72 ±1.12 / 33.74 ms │         30.09 / 30.52 ±0.27 / 30.89 ms │     no change │
│ QQuery 85 │     107.77 / 108.65 ±1.44 / 111.51 ms │      106.63 / 109.06 ±1.89 / 112.45 ms │     no change │
│ QQuery 86 │        25.17 / 25.55 ±0.20 / 25.76 ms │         25.44 / 25.75 ±0.39 / 26.48 ms │     no change │
│ QQuery 87 │        62.56 / 65.13 ±3.46 / 71.86 ms │         62.00 / 62.82 ±0.46 / 63.28 ms │     no change │
│ QQuery 88 │        62.89 / 63.34 ±0.40 / 64.00 ms │         62.95 / 63.47 ±0.35 / 64.04 ms │     no change │
│ QQuery 89 │        35.70 / 36.30 ±0.37 / 36.80 ms │         35.91 / 36.80 ±1.09 / 38.88 ms │     no change │
│ QQuery 90 │        16.99 / 17.16 ±0.15 / 17.44 ms │         17.16 / 17.35 ±0.14 / 17.56 ms │     no change │
│ QQuery 91 │        45.91 / 46.28 ±0.29 / 46.61 ms │         45.97 / 46.34 ±0.54 / 47.40 ms │     no change │
│ QQuery 92 │        29.95 / 32.62 ±3.26 / 38.49 ms │         29.04 / 29.45 ±0.40 / 30.08 ms │ +1.11x faster │
│ QQuery 93 │        50.34 / 51.08 ±0.43 / 51.51 ms │         49.95 / 51.11 ±1.14 / 53.15 ms │     no change │
│ QQuery 94 │        38.39 / 38.76 ±0.38 / 39.35 ms │         38.73 / 39.95 ±0.96 / 41.60 ms │     no change │
│ QQuery 95 │        80.51 / 81.26 ±0.63 / 82.07 ms │         80.93 / 81.31 ±0.42 / 82.01 ms │     no change │
│ QQuery 96 │        24.16 / 26.04 ±2.19 / 29.17 ms │         24.11 / 24.31 ±0.21 / 24.71 ms │ +1.07x faster │
│ QQuery 97 │        46.83 / 47.52 ±0.83 / 48.95 ms │         46.47 / 46.98 ±0.43 / 47.74 ms │     no change │
│ QQuery 98 │        42.54 / 43.18 ±0.34 / 43.48 ms │         42.97 / 43.33 ±0.27 / 43.74 ms │     no change │
│ QQuery 99 │        70.91 / 71.45 ±0.40 / 71.87 ms │         71.12 / 71.68 ±0.29 / 71.96 ms │     no change │
└───────────┴───────────────────────────────────────┴────────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary        ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)        │ 10005.21ms │
│ Total Time (fix-23559)   │  9912.85ms │
│ Average Time (HEAD)      │   101.06ms │
│ Average Time (fix-23559) │   100.13ms │
│ Queries Faster           │          4 │
│ Queries Slower           │          2 │
│ Queries with No Change   │         93 │
│ Queries with Failure     │          0 │
└──────────────────────────┴────────────┘

Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 55.0s
Peak memory 1.9 GiB
Avg memory 1.3 GiB
CPU user 229.0s
CPU sys 6.1s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 50.0s
Peak memory 2.2 GiB
Avg memory 1.6 GiB
CPU user 220.4s
CPU sys 5.9s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and fix-23559
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃                              fix-23559 ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │          1.22 / 4.01 ±5.49 / 14.99 ms │           1.21 / 3.86 ±5.25 / 14.36 ms │     no change │
│ QQuery 1  │        12.81 / 13.23 ±0.22 / 13.43 ms │         13.03 / 13.23 ±0.19 / 13.51 ms │     no change │
│ QQuery 2  │        36.24 / 37.12 ±0.85 / 38.62 ms │         37.11 / 37.32 ±0.14 / 37.53 ms │     no change │
│ QQuery 3  │        30.69 / 31.68 ±0.85 / 33.20 ms │         30.89 / 31.27 ±0.41 / 32.06 ms │     no change │
│ QQuery 4  │     224.23 / 226.63 ±1.97 / 228.63 ms │      221.20 / 225.30 ±2.58 / 228.52 ms │     no change │
│ QQuery 5  │     272.61 / 274.27 ±1.06 / 275.64 ms │      270.24 / 272.26 ±1.76 / 275.30 ms │     no change │
│ QQuery 6  │           1.26 / 1.42 ±0.24 / 1.89 ms │            1.26 / 1.43 ±0.24 / 1.89 ms │     no change │
│ QQuery 7  │        13.91 / 14.13 ±0.16 / 14.30 ms │         14.19 / 14.37 ±0.13 / 14.54 ms │     no change │
│ QQuery 8  │     325.11 / 326.68 ±1.09 / 327.80 ms │      323.34 / 325.94 ±2.34 / 329.30 ms │     no change │
│ QQuery 9  │     453.96 / 462.85 ±7.89 / 476.54 ms │      455.61 / 461.84 ±5.94 / 472.63 ms │     no change │
│ QQuery 10 │        70.04 / 71.71 ±1.23 / 73.00 ms │         68.49 / 71.13 ±3.47 / 77.97 ms │     no change │
│ QQuery 11 │        82.97 / 85.65 ±4.81 / 95.25 ms │         79.55 / 81.09 ±0.98 / 82.13 ms │ +1.06x faster │
│ QQuery 12 │     268.45 / 276.86 ±7.18 / 289.28 ms │      263.17 / 270.30 ±5.08 / 278.06 ms │     no change │
│ QQuery 13 │    371.22 / 388.45 ±11.30 / 404.35 ms │     359.20 / 375.59 ±16.43 / 405.90 ms │     no change │
│ QQuery 14 │     285.57 / 288.99 ±3.37 / 295.07 ms │      280.64 / 283.95 ±4.25 / 292.32 ms │     no change │
│ QQuery 15 │     273.11 / 275.65 ±2.11 / 278.72 ms │      269.98 / 274.60 ±4.58 / 283.34 ms │     no change │
│ QQuery 16 │     610.92 / 619.86 ±8.12 / 633.14 ms │      606.38 / 619.49 ±9.49 / 632.94 ms │     no change │
│ QQuery 17 │     618.27 / 629.01 ±6.62 / 637.01 ms │      612.12 / 621.51 ±5.23 / 627.40 ms │     no change │
│ QQuery 18 │ 1251.29 / 1275.20 ±16.79 / 1292.58 ms │  1249.52 / 1272.20 ±14.87 / 1294.67 ms │     no change │
│ QQuery 19 │        27.76 / 33.74 ±8.00 / 48.25 ms │         28.09 / 31.97 ±5.59 / 42.77 ms │ +1.06x faster │
│ QQuery 20 │    517.50 / 536.06 ±22.88 / 579.06 ms │      515.65 / 521.28 ±6.41 / 531.40 ms │     no change │
│ QQuery 21 │     515.88 / 518.66 ±2.08 / 521.97 ms │      517.52 / 518.88 ±1.53 / 520.99 ms │     no change │
│ QQuery 22 │    979.17 / 987.51 ±9.20 / 1004.23 ms │     990.04 / 995.50 ±4.83 / 1002.75 ms │     no change │
│ QQuery 23 │ 3098.28 / 3138.83 ±37.09 / 3202.99 ms │  3045.01 / 3077.57 ±28.00 / 3119.68 ms │     no change │
│ QQuery 24 │        41.72 / 42.86 ±1.41 / 45.53 ms │         42.32 / 48.56 ±7.86 / 62.90 ms │  1.13x slower │
│ QQuery 25 │     111.82 / 113.52 ±1.48 / 116.14 ms │      111.10 / 113.63 ±2.48 / 117.36 ms │     no change │
│ QQuery 26 │        42.04 / 46.43 ±5.19 / 54.08 ms │         42.00 / 43.40 ±1.58 / 46.45 ms │ +1.07x faster │
│ QQuery 27 │     669.87 / 676.68 ±5.77 / 686.80 ms │      669.37 / 674.17 ±4.93 / 683.47 ms │     no change │
│ QQuery 28 │ 3022.71 / 3034.47 ±10.10 / 3050.04 ms │  3044.73 / 3062.08 ±12.83 / 3078.40 ms │     no change │
│ QQuery 29 │       41.44 / 48.56 ±10.82 / 69.59 ms │         41.39 / 44.28 ±4.36 / 52.94 ms │ +1.10x faster │
│ QQuery 30 │    308.76 / 322.79 ±23.10 / 368.76 ms │      302.72 / 312.97 ±5.63 / 319.73 ms │     no change │
│ QQuery 31 │     289.30 / 295.78 ±5.78 / 303.39 ms │     279.60 / 299.83 ±12.80 / 319.54 ms │     no change │
│ QQuery 32 │    945.66 / 970.43 ±17.77 / 992.71 ms │     923.58 / 950.94 ±15.60 / 969.20 ms │     no change │
│ QQuery 33 │ 1461.89 / 1489.55 ±37.51 / 1562.90 ms │  1460.79 / 1478.78 ±13.30 / 1495.63 ms │     no change │
│ QQuery 34 │ 1474.28 / 1505.81 ±19.20 / 1530.20 ms │ 1494.86 / 1657.51 ±139.68 / 1861.55 ms │  1.10x slower │
│ QQuery 35 │    282.18 / 310.22 ±25.57 / 349.32 ms │     278.14 / 301.57 ±20.23 / 324.66 ms │     no change │
│ QQuery 36 │        64.81 / 69.82 ±4.99 / 76.24 ms │         63.36 / 70.05 ±5.24 / 78.94 ms │     no change │
│ QQuery 37 │        35.28 / 39.61 ±4.38 / 47.20 ms │         35.66 / 43.12 ±6.66 / 52.77 ms │  1.09x slower │
│ QQuery 38 │        40.59 / 42.12 ±1.39 / 44.56 ms │         41.32 / 45.78 ±3.34 / 50.89 ms │  1.09x slower │
│ QQuery 39 │     141.80 / 150.72 ±4.81 / 155.37 ms │      146.80 / 159.14 ±8.49 / 170.33 ms │  1.06x slower │
│ QQuery 40 │        14.64 / 15.76 ±1.32 / 18.30 ms │         14.07 / 16.14 ±2.02 / 19.06 ms │     no change │
│ QQuery 41 │        13.80 / 13.91 ±0.12 / 14.10 ms │         13.60 / 13.92 ±0.26 / 14.27 ms │     no change │
│ QQuery 42 │        13.29 / 13.43 ±0.15 / 13.73 ms │         13.20 / 13.91 ±1.06 / 16.00 ms │     no change │
└───────────┴───────────────────────────────────────┴────────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary        ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)        │ 19720.68ms │
│ Total Time (fix-23559)   │ 19751.65ms │
│ Average Time (HEAD)      │   458.62ms │
│ Average Time (fix-23559) │   459.34ms │
│ Queries Faster           │          4 │
│ Queries Slower           │          5 │
│ Queries with No Change   │         34 │
│ Queries with Failure     │          0 │
└──────────────────────────┴────────────┘

Resource Usage

clickbench_partitioned — base (merge-base)

Metric Value
Wall time 100.0s
Peak memory 9.8 GiB
Avg memory 4.1 GiB
CPU user 1011.9s
CPU sys 68.7s
Peak spill 0 B

clickbench_partitioned — branch

Metric Value
Wall time 100.0s
Peak memory 11.5 GiB
Avg memory 4.5 GiB
CPU user 1012.4s
CPU sys 70.5s
Peak spill 0 B

File an issue against this benchmark runner

Comment thread datafusion/physical-plan/src/common.rs Outdated
use std::sync::atomic::{AtomicUsize, Ordering};

let schema = Arc::new(Schema::new(vec![Field::new("a", DataType::Int32, false)]));
let buffer_size = 1;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you have the same test but with buffer_size 2 as well? (just extract the test code and get an argument for buffer_size)

Comment thread datafusion/physical-plan/src/common.rs Outdated
Comment on lines +606 to +607
// With reserve(), the producer acquires a channel slot before pulling from
// input, so at most buffer_size batches can exist in memory simultaneously.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this (reserve call) refer to current code that can become outdated and then this comment will be confusing.

Comment on lines +200 to 206
while let Ok(permit) = sender.reserve().await {
// Receiver dropped when query is shutdown early (e.g., limit) or error,
// no need to return propagate the send error.
match input.next().await {
Some(item) => permit.send(item),
None => break,
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the comment for the reserve here rather than in the test code.

something like

/// We call `reserve` (which wait to have capacity of at least 1 message in the channel buffer) **before** polling from input
/// since if we first polled from input and then wait for the channel to have capacity for the message we will essentially hold `buffer` (in the channel) + 1 (waiting for the channel to have capacity)

@rluvaton rluvaton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@rluvaton rluvaton added this pull request to the merge queue Jul 14, 2026
Merged via the queue into apache:main with commit 9202698 Jul 14, 2026
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-plan Changes to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Under reservation in multi level merge due to extra buffering in spawn_buffered

3 participants