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

Add API locking file access #238

Closed
markkap opened this Issue Apr 7, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@markkap
Copy link

markkap commented Apr 7, 2019

In a multiprocess environment, it is best that code which is modifying a file will lock the file from modification by other processes to prevent corruption of the resulting file. It is very rare for two processes to try to write to the same file at the "same time", but if it happens it is hard to debug and recover.

The first motivation for the feature is saving .htaccess modifications in #236 but features like saving wp-config.php and robots.txt are about to come as well.

Right now for .htaccess WordPress has some lock implementation but we need to make it more reusable than it is right now.

The main idea for the implementation is to currently provide two ways to access and modify locked files, one with the use of PHP file system APIs and the other via FTP. Locking itself should not depend on which method is used, and a file that got locked with one method will be locked when using the other as well.

@markkap markkap added this to the 1.0.0 milestone Apr 7, 2019

markkap added a commit that referenced this issue Apr 7, 2019

markkap added a commit that referenced this issue Apr 7, 2019

markkap added a commit that referenced this issue Apr 7, 2019

markkap added a commit that referenced this issue Apr 7, 2019

@markkap markkap closed this Apr 7, 2019

markkap added a commit that referenced this issue Apr 7, 2019

markkap added a commit that referenced this issue Apr 7, 2019

markkap added a commit that referenced this issue Apr 8, 2019

markkap added a commit that referenced this issue Apr 10, 2019

markkap added a commit that referenced this issue Apr 10, 2019

markkap added a commit that referenced this issue Apr 10, 2019

markkap added a commit that referenced this issue Apr 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.