Configurable `SftpFileStream.MaxPendingReads`
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 993
- Avg merge
- 9d 21h
- Merged PRs (30d)
- 1
Description
Is it possible to make SftpFileStream.MaxPendingReads a configurable value? I'm currently dealing with a SFTP implementation by a third party integration that applies some special behavior when the file has been read, and it seems like it might be doing so when the read hits EOF. Since this library spams read requests at the server when the file is being downloaded and the size is known, I'm suspecting the server is applying the behavior early due to a race condition, since there's no requirement in the protocol to process requests in the same order as received (actually there is for the same file, but it also mentions something about parallelization that makes this slightly ambiguous) or reads to occur linearly. I don't think the third party will be able to change their implementation soon, so second best thing would be to configure it in this library so there's only one concurrent request, ideally without having to fork and maintain my own copy.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at SftpFileStream.MaxPendingReads and trace how concurrent read requests are scheduled during downloads with a known file size. Make the pending-read limit configurable so callers can select one concurrent request, then verify that normal parallel downloads still retain their existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 67/100