You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This could be a good idea. As mentioned in Slack, I don't know much about them, so I'm not sure I'd be the right person to implement or review this patch.
the current storage implementation uses a home brew approach to locking a file for a specific process.
this is a feature built into posix compatible filesystems.
certmagic filestorage should capability detect if posix locks are available, and if they are, use them to protect access to files.
advisory locks have two major weaknesses, that users of sqlite, mdbx, lmdb, are probably well familiar with.
#1 already exists as an issue in the current implementation
#2 can easily be dealt with by go's mutex.
as a result, I think that it would be good to incorporate this feature into certmagic storage.
that said, I don't use the filesystem module in production, so I don't really care that much. maybe someone who does would be happy to do this work :)
some resources:
https://gavv.net/articles/file-locks/
https://github.com/juju/fslock
The text was updated successfully, but these errors were encountered: