Skip to content

Commit

Permalink
HUE-2861 [desktop] Fix a deadlock waiting for thrift connections
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Erick Tryzelaar committed Jul 21, 2015
1 parent fffb7c0 commit 3d4a0e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion desktop/core/src/desktop/lib/thrift_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ def __getattr__(self, attr_name):
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.
Expand Down

0 comments on commit 3d4a0e8

Please sign in to comment.