[ARVADOS] updated: e4664336c420836bf26f423faf2af9316302da93

Git user git at public.curoverse.com
Mon Nov 28 13:46:38 EST 2016


Summary of changes:
 sdk/python/arvados/keep.py | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

       via  e4664336c420836bf26f423faf2af9316302da93 (commit)
       via  16942303133cb4e6be76d4d33a211d1e0ce2ea38 (commit)
       via  52f9f7b3cf35efb7e8d1189b80f9b0f7afe0e111 (commit)
      from  86f04235021d84afa0d28d105111422e0dd15738 (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 e4664336c420836bf26f423faf2af9316302da93
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Nov 28 13:46:28 2016 -0500

    10586: Add extra notify_all() as deadlock insurance.

diff --git a/sdk/python/arvados/keep.py b/sdk/python/arvados/keep.py
index e331621..c989479 100644
--- a/sdk/python/arvados/keep.py
+++ b/sdk/python/arvados/keep.py
@@ -527,6 +527,13 @@ class KeepClient(object):
             with self.pending_tries_notification:
                 while True:
                     if self.pending_copies() < 1:
+                        # This notify_all() is unnecessary --
+                        # write_success() already called notify_all()
+                        # when pending<1 became true, so it's not
+                        # possible for any other thread to be in
+                        # wait() now -- but it's cheap insurance
+                        # against deadlock so we do it anyway:
+                        self.pending_tries_notification.notify_all()
                         # Drain the queue and then raise Queue.Empty
                         while True:
                             self.get_nowait()

commit 16942303133cb4e6be76d4d33a211d1e0ce2ea38
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Nov 28 13:46:10 2016 -0500

    10586: Fix misuse of "!=" to mean "is not".

diff --git a/sdk/python/arvados/keep.py b/sdk/python/arvados/keep.py
index 17f6913..e331621 100644
--- a/sdk/python/arvados/keep.py
+++ b/sdk/python/arvados/keep.py
@@ -599,7 +599,7 @@ class KeepClient(object):
                 try:
                     locator, copies = self.do_task(service, service_root)
                 except Exception as e:
-                    if e != self.TaskFailed:
+                    if e is not self.TaskFailed:
                         _logger.exception("Exception in KeepWriterThread")
                     self.queue.write_fail(service)
                 else:

commit 52f9f7b3cf35efb7e8d1189b80f9b0f7afe0e111
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Nov 28 13:44:52 2016 -0500

    10586: Do not pile on more errors in the service.finished() case.

diff --git a/sdk/python/arvados/keep.py b/sdk/python/arvados/keep.py
index f318ea7..17f6913 100644
--- a/sdk/python/arvados/keep.py
+++ b/sdk/python/arvados/keep.py
@@ -532,8 +532,12 @@ class KeepClient(object):
                             self.get_nowait()
                             self.task_done()
                     elif self.pending_tries > 0:
+                        service, service_root = self.get_nowait()
+                        if service.finished():
+                            self.task_done()
+                            continue
                         self.pending_tries -= 1
-                        return self.get_nowait()
+                        return service, service_root
                     elif self.empty():
                         self.pending_tries_notification.notify_all()
                         raise Queue.Empty
@@ -604,8 +608,6 @@ class KeepClient(object):
                     self.queue.task_done()
 
         def do_task(self, service, service_root):
-            if service.finished():
-                return
             success = bool(service.put(self.data_hash,
                                         self.data,
                                         timeout=self.timeout))

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list