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
Upgrade mutex #297
Upgrade mutex #297
Conversation
… upgrade script in parallel.
What do you think about this solution? We can copy the script in upgrade.php directly, because I don't feel necessary an elgg_ftok function. |
We could create a ElggMutex class and implement what you have in there. The class would check if the server is running Windows and not use the semaphore for Windows. Windows sites would just have to be careful during upgrade. To make this work on sites with multiple servers, we are going to have to move the mutex into the database. This is starting to sound complicated. |
I have another branch implementing mutex with files. It isn't working, but we can try to do the same with the database. |
I changed my mind. I don't think adding an ElggMutex class is a good idea. Instead, we should create an ElggUpgrader class like I did for the installer. I will add comments about files vs database vs shared memory soon. |
I also think that a ElggMutex will be underused. Can you connect to chat and we talk about it? |
I don't understand what do you mean in move the mutex into database. Is this do not use php semaphores and use the atomicity of the database to implement them? |
Sem and I talked in IRC. We think creating/dropping a table can be used as a mutex. It will be database independent (mysql vs postgres) and work on sites that use multiple servers. |
It is here: #309 I run three times the script, opening at the same time, and it makes them one per one. It isn't the hoped behavior, the second and third script should stop... |
No description provided.