[ARVADOS] updated: f4661a02245a35f8d223693a5aecaae87083fb16

Git user git at public.curoverse.com
Fri Apr 21 14:48:20 EDT 2017


Summary of changes:
 sdk/python/arvados/arvfile.py | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

       via  f4661a02245a35f8d223693a5aecaae87083fb16 (commit)
      from  52c6f13db207030bdbe063665c0dd524007db828 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit f4661a02245a35f8d223693a5aecaae87083fb16
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Fri Apr 21 14:48:15 2017 -0400

    11507: Put self._pending_write_size update back under the lock.

diff --git a/sdk/python/arvados/arvfile.py b/sdk/python/arvados/arvfile.py
index c41a45f..64e0f05 100644
--- a/sdk/python/arvados/arvfile.py
+++ b/sdk/python/arvados/arvfile.py
@@ -585,17 +585,18 @@ class _BlockManager(object):
 
     def repack_small_blocks(self, force=False, sync=False, closed_file_size=0):
         """Packs small blocks together before uploading"""
-        self._pending_write_size += closed_file_size
 
-        # Check if there are enough small blocks for filling up one in full
-        if not (force or (self._pending_write_size >= config.KEEP_BLOCK_SIZE)):
-            return
-
-        # Search blocks ready for getting packed together before being committed to Keep.
-        # A WRITABLE block always has an owner.
-        # A WRITABLE block with its owner.closed() implies that it's
-        # size is <= KEEP_BLOCK_SIZE/2.
         with self.lock:
+            self._pending_write_size += closed_file_size
+
+            # Check if there are enough small blocks for filling up one in full
+            if not (force or (self._pending_write_size >= config.KEEP_BLOCK_SIZE)):
+                return
+
+            # Search blocks ready for getting packed together before being committed to Keep.
+            # A WRITABLE block always has an owner.
+            # A WRITABLE block with its owner.closed() implies that it's
+            # size is <= KEEP_BLOCK_SIZE/2.
             bufferblocks = self._bufferblocks.values()
 
         try:

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list