Commit Graph

7 Commits

Author SHA1 Message Date
Marius f6a5530df8 Integrate LockingStore into UnroutedHandler
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
2015-12-26 21:23:09 +01:00
Acconut 290fea5dac return new offset after successful PATCH request 2015-03-23 19:02:12 +01:00
Acconut 5772ec458f close io.Reader in tests 2015-02-28 16:12:33 +01:00
Acconut 1659517825 test inferface implentation for FileStore 2015-02-28 14:49:52 +01:00
Acconut 9f94d0591b add support for Termination extension 2015-02-28 14:47:39 +01:00
Acconut 0c16aedc29 use tusd.FileInfo in DataStore.NewUpload 2015-02-16 17:53:50 +01:00
Acconut 0f79383af2 add test for filestore 2015-02-12 16:06:15 +01:00