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

Don't allow concurrent processes to try creating files with the same name #578

Open
sabina-talipova opened this issue Oct 18, 2023 · 0 comments

Comments

@sabina-talipova
Copy link
Contributor

sabina-talipova commented Oct 18, 2023

Description

Currently if two files are uploaded at the same time, they could both have the same name. This would result in an error, though exactly what the error behaviour would be is undetermined.

We should add a read lock in File::onBeforeWrite() to avoid other processes creating files with the same name before this process has a chance to persist in the database.

See:

// TODO Add read lock to avoid other processes creating files with the same name

@GuySartorelli GuySartorelli changed the title TODO: Add read lock to avoid other processes creating files in File::onBeforeWrite() Don't allow concurrent processes to try creating files with the same name Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant