浏览代码

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 年之前
父节点
当前提交
3d4a0e8
共有 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]
       return self.__dict__[attr_name]
 
 
     # Fetch the thrift client from the pool
     # 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
     # Fetch the attribute. If it's callable, wrap it in a wrapper that re-gets
     # the client.
     # the client.