Browse Source

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 năm trước cách đây
mục cha
commit
3d4a0e899f
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  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.