9701: Simplifying small bufferblock query
authorLucas Di Pentima <lucas@curoverse.com>
Fri, 7 Oct 2016 20:59:16 +0000 (17:59 -0300)
committerLucas Di Pentima <lucas@curoverse.com>
Fri, 7 Oct 2016 20:59:16 +0000 (17:59 -0300)
sdk/python/arvados/arvfile.py

index 7100d056721ba08a2875c2d1414b816dbed88646..3d5e9215eff4ecd80f82c94b7f78677f1e211c67 100644 (file)
@@ -552,8 +552,8 @@ class _BlockManager(object):
     @synchronized
     def repack_small_blocks(self, force=False, sync=False):
         """Packs small blocks together before uploading"""
-        # Search blocks ready for getting packed together before being committed to Keep
-        small_blocks = [b for b in self._bufferblocks.values() if b.state() == _BufferBlock.WRITABLE and b.owner and b.owner.closed() and b.owner.size() <= (config.KEEP_BLOCK_SIZE / 2)]
+        # Search blocks ready for getting packed together before being committed to Keep.
+        small_blocks = [b for b in self._bufferblocks.values() if b.state() == _BufferBlock.WRITABLE and b.owner.closed()]
         if len(small_blocks) <= 1:
             # Not enough small blocks for repacking
             return