From: Lucas Di Pentima Date: Fri, 28 Oct 2016 18:33:03 +0000 (-0300) Subject: 10315: Moved conditional on pending write size checking X-Git-Tag: 1.1.0~631^2~1 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/5c05b488a1f2318e73780b67f6f654b4a12c32b3?ds=inline 10315: Moved conditional on pending write size checking --- diff --git a/sdk/python/arvados/arvfile.py b/sdk/python/arvados/arvfile.py index 7ee028db2a..610fd7dc13 100644 --- a/sdk/python/arvados/arvfile.py +++ b/sdk/python/arvados/arvfile.py @@ -576,10 +576,9 @@ class _BlockManager(object): # Update the pending write size count with its true value, just in case # some small file was opened, written and closed several times. - if not force: - self._pending_write_size = sum([b.size() for b in small_blocks]) - if self._pending_write_size < config.KEEP_BLOCK_SIZE: - return + self._pending_write_size = sum([b.size() for b in small_blocks]) + if self._pending_write_size < config.KEEP_BLOCK_SIZE and not force: + return new_bb = self._alloc_bufferblock() while len(small_blocks) > 0 and (new_bb.write_pointer + small_blocks[0].size()) <= config.KEEP_BLOCK_SIZE: