Skip to content

Conversation

@drzraf
Copy link
Collaborator

@drzraf drzraf commented Sep 8, 2021

One way abort() can be called on a chunk is by a failure detected by the doneHandler()
In that case, the chunk's status() would still be uploading what does not keep a retry from happening because it'd skip the uploadNextChunk() codepath.

But there is another case which is calling File.pause() where a call to resume() is expected to go through uploadNextChunk() which does check chunk's status() is pending. It's also semantically more adequate and that what this PR fixes.

This is a requirement for #348 which go deeper into testing pause/resume behaviors.

Raphaël Droz added 2 commits September 8, 2021 17:51
…its status back to pending (and pendingRetry === true) since it's actually not "uploading" anymore
@drzraf drzraf changed the title chunk.abort() set FlowFile status to "pending" instead of "uploading" chunk.abort() to set FlowFile status to "pending" instead of "uploading" Sep 8, 2021
@drzraf drzraf requested a review from AidasK September 8, 2021 21:02
@drzraf drzraf added the v3 label Sep 8, 2021
@AidasK
Copy link
Member

AidasK commented Sep 9, 2021

Looks fine. I would approve this but can't, since I can't find "Approve" button. Please merge it :)

@drzraf
Copy link
Collaborator Author

drzraf commented Sep 9, 2021

Looks fine. I would approve this but can't, since I can't find "Approve" button.

Why so ?

@drzraf drzraf merged commit 0eb7bbb into flowjs:v3 Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants