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

Users can trigger a download of any of their files that exceed the limit, if the files sizes are not yet set. #1444

Closed
prioux opened this issue Nov 7, 2024 · 1 comment · Fixed by #1453

Comments

@prioux
Copy link
Member

prioux commented Nov 7, 2024

When any new FIleCollection is being registered, the size and num_files attributes are set to nil for a short period of time until, in the background, the system has finished counting the files and the sum of their sizes.

So there is a short window when a user can access the 'show' page of such a FileCollection, and because the size i not set, they can click the 'download' button and trigger a background synchronization and TAR making (what is commonly done during a dowload) even for very very large collections.

The download action should refuse to trigger a download on any file that doesn't yet have a size set (and warn the user about this).

@prioux
Copy link
Member Author

prioux commented Nov 7, 2024

Some context. A user registered a huge 40+ gig FileCollection with 280,000 files on a personal data provider. The user went to the show page while the sizes and number of files were still being counted and clicked the 'download' button. CBRAIN proceeded over the next several hours to sync the data set to cache and create a huge TAR file that was not sent anywhere in the end, because the user's browser had disconnected anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants