Преглед на файлове

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]
 
     # 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.