Skip to content

Avoid concurrent file access by using file locking? #92

@NicoHood

Description

@NicoHood

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions