Explorar o código

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 %!s(int64=10) %!d(string=hai) anos
pai
achega
3d4a0e899f
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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.