From 38e0a4759bd128a93fa6f688db11330089579c6f Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 26 Nov 2015 12:43:04 +0100 Subject: [PATCH] Add documentation for order of termination --- limitedstore/limitedstore.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/limitedstore/limitedstore.go b/limitedstore/limitedstore.go index 1b2e634..5fbc62a 100644 --- a/limitedstore/limitedstore.go +++ b/limitedstore/limitedstore.go @@ -2,12 +2,13 @@ // datastores (tusd.DataStore) while limiting the used storage size. // It will start terminating existing uploads if not enough space is left in // order to create a new upload. +// The order in which the uploads will be terminated is defined by their size, +// whereas the biggest ones are deleted first. // This package's functionality is very limited and naive. It will terminate -// uploads whether they are finished yet or not and it won't terminate them -// intelligently (e.g. bigger uploads first). Only one datastore is allowed to +// uploads whether they are finished yet or not. Only one datastore is allowed to // access the underlying storage else the limited store will not function // properly. Two tusd.FileStore instances using the same directory, for example. -// In addition the limited store will keep a list of the uploads' ids in memory +// In addition the limited store will keep a list of the uploads' IDs in memory // which may create a growing memory leak. package limitedstore