Commit 487301c
authored
perf: pipeline SFTP requests for upload/download
Implements bounded pipelined SFTP upload/download helpers and wires file transfers to use up to 64 concurrent SFTP requests.
Review follow-up included:
- cap server-advertised read/write lengths against local maxima to avoid oversized allocations from untrusted SFTP metadata
- bound the download reorder queue across both in-flight and pending out-of-order responses
- use fstat size information where available to avoid reads past EOF and validate unexpected short reads
- preserve remote download handle shutdown behavior after syncing with main
- add SFTP crate tests for chunk-size capping and in-memory pipelined upload/download behavior
Validation:
- cargo fmt --check
- cargo clippy -- -D warnings
- cargo test -p bssh-russh-sftp
- cargo test --lib --verbose (1222 passed, 9 ignored)
- cargo test --tests --verbose -- --skip integration_test
- GitHub Actions CI and CLA checks passed on 9ac61d21 parent 0a9f647 commit 487301c
6 files changed
Lines changed: 428 additions & 99 deletions
File tree
- crates/bssh-russh-sftp
- src/client/fs
- docs/architecture
- src/ssh/tokio_client
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
0 commit comments