Commit f5c9ab9
committed
fix(transfer): self-dial cloned worker on read_range for SFTP/FTP pools
Clone-for-transfer workers in the SFTP and FTP pool kinds honestly
start UNCONNECTED (PD-SFTP-1 / PD-FTP-1 contract): each worker
self-dials its own connection on first transfer. download() already
calls ensure_connected() before using the session, but read_range()
did not. The new GUI segmented engine
(run_provider_segmented_download from GTC-2) puts the cloned
workers into a pool and then drives them via read_range, not
download, so the per-worker self-dial never fired and every
segmented attempt failed with "Not connected to server".
Fix: lift the same self.ensure_connected().await? guard from
download() into read_range() on both SFTP and FTP. The call is a
no-op when already connected, so the CLI pget_segmented_download
path (which pre-connects each worker via create_and_connect) is
unaffected, and the existing download() callers keep behaving
identically.
Surfaced by live-WAN validation of GTC-1 / GTC-2 against the
axpbuntu lab (see tests/gtc/reports/20260520T113538Z_gui_wan/).
After the fix, SFTP segmented byte-identical at 2.52x, FTP at
1.71x, both inside the parity-oracle spec band.1 parent 82bc910 commit f5c9ab9
2 files changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1513 | 1513 | | |
1514 | 1514 | | |
1515 | 1515 | | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
1516 | 1522 | | |
1517 | 1523 | | |
1518 | 1524 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1971 | 1971 | | |
1972 | 1972 | | |
1973 | 1973 | | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
1974 | 1981 | | |
1975 | 1982 | | |
1976 | 1983 | | |
| |||
0 commit comments