concurrency failure with multisite when NOT network activated; advanced-cache.php data loss #59
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
While fixing https://github.com/petermolnar/wp-ffpc/issues/56, I discovered that wp-ffpc does not handle concurrency when read/writing the advanced-cache.php file under Wordpress multisite when not network activated.
Scenario:
Step 5 exposes the problem. Two admins on two (or more) subsites could make changes to their wp-ffpc config at the same time. When different threads/processes are running the PHP, it is possible for the memory structure of the wpffpc global config to not match the memory structure of the on-disk advanced-cache.php due to the order of execution of the different site's threads. For example:
I would recommend the second solution. That is, to only allow network activation and not per-site. In that solution, there is only one admin (the super admin) making changes. It is highly unlikely that super admin will have two browsers open at the same time, on the wpffpc settings page, pressing save at the same time.
@diablodale sorry for being this quiet; the truth is, a long needed refactoring this plugin had been postponed by my for years now, and I still don't have the capacity to do it.
I welcome any changes, significant ones as well and I'd be happy to give access rights to the plugin's WordPress repository as well.
Would you be open for that?
That is ok with me. I will keep any changes I make in branches until you feel I can make changes to master.
I have created a separate branch (in my fork) with the changes I have made for https://github.com/petermolnar/wp-ffpc/issues/56. The work is complete. I only need to do some more testing with multisite. My changes exposed a minor UI issue with admin notices. I want to fix that also so the notices are not confusing.
If I had access rights here, I can create a branch and move/copy the changes from my fork's branch into your branch here. I have never done cross-repro branch copy/merges before, but I read it is easy. ;-) If there is a specific process you want me to follow, please educate me so I can make a smart choice.