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

Avoid concurrent file access by using file locking? #92

Open
NicoHood opened this issue Sep 28, 2020 · 0 comments
Open

Avoid concurrent file access by using file locking? #92

NicoHood opened this issue Sep 28, 2020 · 0 comments

Comments

@NicoHood
Copy link

I am wondering if it would make sense to add some basic file locking to the comments plugin? If two users would comment at the same time on the same site (which could happen, if the page is popular), the comment file would be corrupted.

Is this assumption correct or does grav have some other locking in the backend (like only processing one form at the same time)?

I've use this API then:
https://learn.getgrav.org/16/api#class-gravframeworkfileabstractfile

It provides basic locking. However some method to wait for the lock to release is not implemented. Is this something that could make sense in the general API?

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

No branches or pull requests

1 participant