Part of bzrlib.transport.sftp View In Hierarchy
Method | __init__ | Create a new readv helper. |
Method | request_and_yield_offsets | Request the data from the remote machine, yielding the results. |
Method | _get_requests | Break up the offsets into individual requests over sftp. |
Parameters | original_offsets | The original requests given by the caller of readv() |
relpath | The name of the file (if known) | |
_report_activity | A Transport._report_activity bound method, to be called as data arrives. |
The SFTP spec only requires implementers to support 32kB requests. We could try something larger (openssh supports 64kB), but then we have to handle requests that fail. So instead, we just break up our maximum chunks into 32kB chunks, and asyncronously requests them. Newer versions of paramiko would do the chunking for us, but we want to start processing results right away, so we do it ourselves.