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

Make a directory safely without raising error #101

Merged
merged 1 commit into from
Apr 30, 2023

Conversation

mreid-tt
Copy link
Contributor

@mreid-tt mreid-tt commented Apr 30, 2023

During the upload of SPK files, if this is for a new package or version, folders and corresponding database entries are created. During this process, if there are multiple concurrent requests there is a risk that one process may be attempting to create a folder after another process has already done so. This would result in an exception that can cause the cleanup of folders to occur and put the system into an inconsistent state. This PR changes the way folders are created to not raise an error if one already exists to avoid this.

Fixes: #95

@mreid-tt mreid-tt merged commit 8a1ea48 into SynoCommunity:main Apr 30, 2023
@mreid-tt mreid-tt deleted the api-save-files-patch branch April 30, 2023 10:36
@mreid-tt
Copy link
Contributor Author

@Diaoul, much thanks for approving this PR. You mentioned creating a release to get the previous changes implemented in the production server. Let me know if I can be of assistance to get this done.

@mreid-tt
Copy link
Contributor Author

@Diaoul, any cycles available to revisit pushing this to the live repo?

@hgy59
Copy link
Contributor

hgy59 commented Nov 11, 2023

@mreid-tt I hope we can revert #99 to solve #106 before going live.

@mreid-tt
Copy link
Contributor Author

mreid-tt commented Nov 11, 2023

@Diaoul, I mean sure. I don't mind rolling back any of my previous PRs if we can get the repo unstuck. My understanding from your previous comments was that there was something in there from before which was causing it to crash when we tried to go live with the code. I don't know if this was also the reason the GitHub tests seem to fail.

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.

Unable to publish package (500 Internal Server Error)
3 participants