[ARVADOS] created: 2.1.0-223-g0ea8f67a0
Git user
git at public.arvados.org
Tue Dec 22 15:42:34 UTC 2020
at 0ea8f67a0062444938ea38d0c354bce3503649d9 (commit)
commit 0ea8f67a0062444938ea38d0c354bce3503649d9
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date: Tue Dec 22 12:41:01 2020 -0300
17118: Changes the way exception raising is done on PySDK's KeepWriterThread.
This solves the OOM bug where some keepstores fail when uploading data.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>
diff --git a/sdk/python/arvados/keep.py b/sdk/python/arvados/keep.py
index bc43b849c..bd0e5dc1e 100644
--- a/sdk/python/arvados/keep.py
+++ b/sdk/python/arvados/keep.py
@@ -648,7 +648,7 @@ class KeepClient(object):
class KeepWriterThread(threading.Thread):
- TaskFailed = RuntimeError()
+ class TaskFailed(RuntimeError): pass
def __init__(self, queue, data, data_hash, timeout=None):
super(KeepClient.KeepWriterThread, self).__init__()
@@ -667,7 +667,7 @@ class KeepClient(object):
try:
locator, copies = self.do_task(service, service_root)
except Exception as e:
- if e is not self.TaskFailed:
+ if not isinstance(e, self.TaskFailed):
_logger.exception("Exception in KeepWriterThread")
self.queue.write_fail(service)
else:
@@ -687,7 +687,7 @@ class KeepClient(object):
self.data_hash,
result['status_code'],
result['body'])
- raise self.TaskFailed
+ raise self.TaskFailed()
_logger.debug("KeepWriterThread %s succeeded %s+%i %s",
str(threading.current_thread()),
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list