Add a chunk cleanup queue for async GC of empty chunks
Instead of having the Swift storage engine try to delete the empty chunk(s) synchronously, we simply queue them and have a worker come along after 30s to delete the empty chunks. This has a few key benefits: it is async (doesn't slow down the push code), helps deal with Swift's eventual consistency (less retries necessary) and is generic for other storage engines if/when they need this as well
This commit is contained in:
parent
59cb6bd216
commit
5f99448adc
12 changed files with 191 additions and 59 deletions
|
@ -9,7 +9,7 @@ from storage.basestorage import BaseStorageV2
|
|||
_FAKE_STORAGE_MAP = defaultdict(StringIO.StringIO)
|
||||
|
||||
class FakeStorage(BaseStorageV2):
|
||||
def __init__(self, metric_queue):
|
||||
def __init__(self, context):
|
||||
super(FakeStorage, self).__init__()
|
||||
|
||||
def _init_path(self, path=None, create=False):
|
||||
|
|
Reference in a new issue