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

[MDS-5746] Fix issue when uploading multiple files in parallel #2902

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

simensma-fresh
Copy link
Collaborator

@simensma-fresh simensma-fresh commented Jan 22, 2024

Objective

MDS-5746

This fixes an issue with parallel file uploads where sometimes files would not appear in the list of submitted files after being submitted.
This happens when file upload are completed too close together, and are caused by how we handle updating the state with newly uploaded files (common pattern across the system).

image

The setUploadedFiles(...) is actually performed async (as with all state updates), so if you call them two times in short order, uploadedFiles might not have had time to finish updating before the second call, so an old value is read, causing files to be missed

@simensma-fresh simensma-fresh changed the title [MDS-5746] Upload 1 file at a time [MDS-5746] Fix issue when uploading multiple files in parallel Jan 22, 2024
@simensma-fresh simensma-fresh merged commit 847a410 into develop Jan 22, 2024
11 checks passed
@simensma-fresh simensma-fresh deleted the MDS-5746_FIle-upload-fix branch January 22, 2024 16:40
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.

3 participants