瀏覽代碼

HUE-2861 [desktop] Fix a deadlock waiting for thrift connections

This fixes a deadlock when there are no available thrift sockets.
We suspect that some codepaths are trying to grab multiple thift
connections at the same time, and when multiple threads hit this
codepath, it can cause those threads to be blocked waiting for the
other threads to give up their connections. This timeout should
break these deadlocks.
Erick Tryzelaar 10 年之前
父節點
當前提交
3d4a0e899f
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      desktop/core/src/desktop/lib/thrift_util.py

+ 2 - 1
desktop/core/src/desktop/lib/thrift_util.py

@@ -317,7 +317,8 @@ class PooledClient(object):
       return self.__dict__[attr_name]
 
     # Fetch the thrift client from the pool
-    superclient = _connection_pool.get_client(self.conf)
+    superclient = _connection_pool.get_client(self.conf,
+        get_client_timeout=self.conf.timeout_seconds)
 
     # Fetch the attribute. If it's callable, wrap it in a wrapper that re-gets
     # the client.