[ARVADOS] created: b16358fa5145d3d4bcd0ac37bd81d7605eac040f

git at public.curoverse.com git at public.curoverse.com
Tue Sep 22 13:47:43 EDT 2015


        at  b16358fa5145d3d4bcd0ac37bd81d7605eac040f (commit)


commit b16358fa5145d3d4bcd0ac37bd81d7605eac040f
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Tue Sep 22 11:47:25 2015 -0400

    7225: Fix typo in _BufferBlock.set_state() that resulted in "wait for pending
    block commit" code getting skipped.  Set PUT thread to daemon thread; users
    must call save() or flush() or use `with` to guarantee that blocks get written.

diff --git a/sdk/python/arvados/arvfile.py b/sdk/python/arvados/arvfile.py
index 106f7a7..b17d547 100644
--- a/sdk/python/arvados/arvfile.py
+++ b/sdk/python/arvados/arvfile.py
@@ -320,7 +320,7 @@ class _BufferBlock(object):
     @synchronized
     def set_state(self, nextstate, val=None):
         if (self._state, nextstate) not in self.STATE_TRANSITIONS:
-            raise StateChangeError("Invalid state change from %s to %s" % (self.state, nextstate), self.state, nextstate)
+            raise StateChangeError("Invalid state change from %s to %s" % (self._state, nextstate), self._state, nextstate)
         self._state = nextstate
 
         if self._state == _BufferBlock.PENDING:
@@ -491,7 +491,7 @@ class _BlockManager(object):
             for i in xrange(0, self.num_put_threads):
                 thread = threading.Thread(target=self._commit_bufferblock_worker)
                 self._put_threads.append(thread)
-                thread.daemon = False
+                thread.daemon = True
                 thread.start()
 
     def _block_prefetch_worker(self):

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list