Commit 1bda0d9
feat(io): bypass backpressure for io_buffer_size=0 and 2.0 indirect I/O (#6627)
## Summary
- When `SchedulerConfig` is created with `io_buffer_size_bytes = 0`, the
byte-based backpressure system is disabled entirely — all I/O proceeds
without waiting for budget. Previously a
zero buffer size would deadlock (every read exceeds a zero budget).
- New env var `LANCE_BYPASS_INDIRECT_IO_BACKPRESSURE`: when set,
indirect I/O in the **2.0 list scheduler** (`indirect_schedule_task` —
items fetched after decoding offsets) bypasses the
backpressure budget. This is surfaced via a new
`EncodingsIo::with_bypass_backpressure()` method implemented by
`LanceEncodingsIo`.
Both the standard and lite schedulers are updated consistently. The IOPS
concurrency limit is unaffected; only the byte-budget gate is bypassed.
## Changed files
| File | Change |
|------|--------|
| `rust/lance-io/src/scheduler.rs` | `no_backpressure` on
`IoQueueState`; `bypass_backpressure` on `IoTask`/`MutableBatch`;
`FileScheduler::with_bypass_backpressure()` |
| `rust/lance-io/src/scheduler/lite.rs` | `no_backpressure` on
`SimpleBackpressureThrottle`; `force_acquire` on `BackpressureThrottle`
trait; `bypass_backpressure` on lite `IoTask` |
| `rust/lance-encoding/src/lib.rs` |
`EncodingsIo::with_bypass_backpressure()` default method |
| `rust/lance-file/src/io.rs` | `LanceEncodingsIo` override of
`with_bypass_backpressure()` |
| `rust/lance-encoding/src/previous/encodings/logical/list.rs` |
`LANCE_BYPASS_INDIRECT_IO_BACKPRESSURE` env var + bypass io wrapping in
indirect schedule |
## Test plan
- [ ] `cargo test -p lance-io --lib` — 155 tests pass (io_uring tests
excluded, require kernel support)
- [ ] `cargo test -p lance-encoding --lib` — 369 tests pass
- [ ] `cargo check --workspace --tests` — clean
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 2fb821c commit 1bda0d9
5 files changed
Lines changed: 453 additions & 39 deletions
File tree
- rust
- lance-encoding/src
- previous/encodings/logical
- lance-file/src
- lance-io/src
- scheduler
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
78 | 89 | | |
79 | 90 | | |
80 | 91 | | |
| |||
Lines changed: 26 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
5 | 9 | | |
6 | 10 | | |
7 | 11 | | |
| |||
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
15 | | - | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| |||
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
38 | 56 | | |
39 | 57 | | |
40 | 58 | | |
| |||
454 | 472 | | |
455 | 473 | | |
456 | 474 | | |
457 | | - | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
458 | 481 | | |
459 | 482 | | |
460 | 483 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
32 | 41 | | |
33 | 42 | | |
34 | 43 | | |
| |||
0 commit comments