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

Apps update in loadApps issue for concurrent requests #9856

Closed
PVince81 opened this issue Jul 24, 2014 · 5 comments
Closed

Apps update in loadApps issue for concurrent requests #9856

PVince81 opened this issue Jul 24, 2014 · 5 comments
Assignees
Milestone

Comments

@PVince81
Copy link
Contributor

I haven't reproduced this case yet, but it is likely to happen.

From my understanding, if the app version in the DB is less then the current code version, the next time the app is loaded it will auto-update.

The problem with this is that if there are more than one PHP request happening, it will cause the update code to run twice in parallel and is likely to mess up the DB if the app has a update.php, because there is no locking mechanism.

So, I was wondering why we had such app updates in the first place.
I understand that core apps need to update automatically during the main update routine or at the time they get enabled, in case they were disabled earlier.

One alternative would be to have a button in the app store "update all apps" to manually update apps. Normally apps would update themselves during the core upgrade but there are situations where it's not the case.

What do you think ?

@karlitschek @georgehrke @icewind1991 @DeepDiver1975

I wrote this mostly because of the recent upgrade issues from many people that were caused by concurrent loadApps/updateApps: #9824

@PVince81
Copy link
Contributor Author

Another case popped up: when running the CLI upgrade the console.php also calls loadApps(), which triggers the upgrade too early.

@PVince81
Copy link
Contributor Author

I wonder how this could have ever worked before... maybe because apps didn't do that many update changes in previous releases.

@MTRichards MTRichards added this to the ownCloud 7.0.1 milestone Jul 24, 2014
@PVince81
Copy link
Contributor Author

@icewind1991's PR will prevent this: #9866

@PVince81
Copy link
Contributor Author

Assigning to @icewind1991 for visilibilty (since the work is in the PR)

@craigpg craigpg modified the milestones: 2014-sprint-03-next, 2014-sprint-02-current Sep 2, 2014
@PVince81
Copy link
Contributor Author

PVince81 commented Sep 5, 2014

Fixed in #9866

@PVince81 PVince81 closed this as completed Sep 5, 2014
@craigpg craigpg modified the milestones: archive, 2014-sprint-03 Sep 15, 2014
@lock lock bot locked as resolved and limited conversation to collaborators Aug 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants