Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@tus/s3-store: fix min part size condition & offset race condition #475

Merged
merged 3 commits into from
Sep 4, 2023

Conversation

Murderlon
Copy link
Member

@Murderlon Murderlon commented Aug 30, 2023

Fixes #415

  • if the current part is exactly the minimum part size, then that should also be allowed, not minimum + 1
  • fix race condition in which the stream splitter is faster than uploading to S3, resulting the offset not being updated in time before the next chunk is handled.

Copy link
Member

@Acconut Acconut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Could we add a test for this to avoid a regression?

@Murderlon
Copy link
Member Author

It seems I missed another edge case. Taking another look next week and I'll make tests for both cases then.

@Murderlon Murderlon marked this pull request as draft September 1, 2023 09:41
@Murderlon Murderlon marked this pull request as ready for review September 4, 2023 10:01
@Murderlon Murderlon changed the title @tus/s3-store: fix min part size condition @tus/s3-store: fix min part size condition & offset race condition Sep 4, 2023
Copy link
Member

@Acconut Acconut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, that's a nasty bug. Great work!

@Murderlon Murderlon merged commit b68458f into main Sep 4, 2023
3 checks passed
@Murderlon Murderlon deleted the s3-min-part-fix branch September 4, 2023 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Last part of multi-upload is ignored
2 participants