getgrav / getgrav/grav-plugin-comments

Avoid concurrent file access by using file locking?

Open
#92 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
54
Forks
26
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.