From: Lucas Di Pentima Date: Wed, 26 Oct 2016 15:01:55 +0000 (-0300) Subject: 10315: Moved the BlockManager's put threads lazy loading to __init__() to avoid locki... X-Git-Tag: 1.1.0~631^2~4 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/078bdb166766423e1a423523e5285966aff7ec6b 10315: Moved the BlockManager's put threads lazy loading to __init__() to avoid locking issues when calling commit_bufferblock() fropm within an already @synchronized method. --- diff --git a/sdk/python/arvados/arvfile.py b/sdk/python/arvados/arvfile.py index aac2595630..5ae53f47eb 100644 --- a/sdk/python/arvados/arvfile.py +++ b/sdk/python/arvados/arvfile.py @@ -418,6 +418,7 @@ class _BlockManager(object): self.num_get_threads = _BlockManager.DEFAULT_GET_THREADS self.copies = copies self._pending_write_size = 0 + self.start_put_threads() @synchronized def alloc_bufferblock(self, blockid=None, starting_capacity=2**14, owner=None): @@ -626,7 +627,6 @@ class _BlockManager(object): block.set_state(_BufferBlock.ERROR, e) raise else: - self.start_put_threads() self._put_queue.put(block) @synchronized