You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v3 does not support pausing/resuming from stream #346
The current pause process consist into aborting all ongoing XHR object. Conversely resume call Flow.upload() again which goes over each pending chunk.
In the case of ReadableStream we can not expect to read() twice a regular file (as expected by FlowChunk.send()).
A possible implementation could conserve the XHR payload in order to recreate it again (instead of setting FlowChunk's XHR to null)
If I call await files[0].chunks[0].send(); (uploading only one chunk of one file), it'll call FlowChunk.doneHandler() which in turn calls parent's flowObj.uploadNextChunk() which read/consume/send all remaining chunks.
It's a counter-intuitive design. Wouldn't we prefer a more predictable chaining process?
I also wonder about the following: An xhr.error(); => doneHandler (status === 'error') => abort(true) Why not using the retry() logic? Eg: We may receive a 400 or Timeout error because of some bandwidth exhaustion and it's worth retrying don't you think?
Activity
[-]v3 does not support resuming from stream[/-][+]v3 does not support pausing/resuming from stream[/+]drzraf commentedon Aug 12, 2021
I've a problem with the current code paths.
If I call
await files[0].chunks[0].send();(uploading only one chunk of one file), it'll callFlowChunk.doneHandler()which in turn calls parent'sflowObj.uploadNextChunk()which read/consume/send all remaining chunks.It's a counter-intuitive design. Wouldn't we prefer a more predictable chaining process?
AidasK commentedon Aug 12, 2021
I think you have mentioned this problem earlier. I agree that it can be improved
drzraf commentedon Aug 12, 2021
I also wonder about the following:Anxhr.error();=>doneHandler (status === 'error')=>abort(true)Why not using theretry()logic? Eg: We may receive a 400 or Timeout error because of some bandwidth exhaustion and it's worth retrying don't you think?Ability for chunks corresponding to stream, to be correctly retried i…
tests: Add tests for streamed-chunks retry, flowjs#346
Ability for chunks corresponding to stream, to be correctly retried i…
tests: Add tests for streamed-chunks retry, flowjs#346
Ability for chunks corresponding to stream, to be correctly retried i…
tests: Add tests for streamed-chunks retry, flowjs#346
Ability for chunks corresponding to stream, to be correctly retried i…
tests: Add tests for streamed-chunks retry, flowjs#346
Improvements to chunks coming from a stream/async reader (#348)
drzraf commentedon Sep 16, 2021
#348 fixed it. Pause & resuming from stream now works.
The counter-intuitive
pause()/resume()design can be solved in a subsequent issue.