11684: Reverted easy fix to expose the bug: when there's a delay writing a block...
authorLucas Di Pentima <lucas@curoverse.com>
Mon, 22 May 2017 20:05:45 +0000 (17:05 -0300)
committerLucas Di Pentima <lucas@curoverse.com>
Mon, 22 May 2017 20:05:45 +0000 (17:05 -0300)
produced by packing smaller blocks into one, its locator doesn't get updated with the
correct access token, so it will fail when trying to save the collection to the API
server.

sdk/python/arvados/arvfile.py

index 9ba43490e73a455dd1193590e4ec1043fef31f10..2fc9c73afe031543ab7afb67edcd2e7a5c4c7d6f 100644 (file)
@@ -680,7 +680,7 @@ class _BlockManager(object):
             new_bb.append(bb.buffer_view[0:bb.write_pointer].tobytes())
             files.append((bb, new_bb.write_pointer - bb.size()))
 
-        self.commit_bufferblock(new_bb, sync=True)
+        self.commit_bufferblock(new_bb, sync=sync)
 
         for bb, new_bb_segment_offset in files:
             newsegs = bb.owner.segments()