f6a5530df8
The reason behind this drastic move was that sometimes a lock needs to persist across multiple calls to a DataStore. For example, when a PATCH request is received, following behaviour is wanted: * Obtain lock (LockUpload) * Get offset, size etc (GetInfo) * Write data (WriteChunk) * Release lock (UnlockUpload) However, before this change, the lock would be release and then obtained again after the GetInfo and before the WriteChunk call. This resulted in an inefficient resource usage and even a possible race condition. The effects of this change was: * FileLocker is now directly integrated into FileStore and not sperarated * LockingStore and the entire package has been removed * MemoryLocker has been moved into its very own package |
||
---|---|---|
.. | ||
filestore.go | ||
filestore_test.go |