Jean-Daniel Cryans has submitted this change and it was merged. Change subject: KUDU-1894 fixed deadlock in client.Connection ......................................................................
KUDU-1894 fixed deadlock in client.Connection Due to the reverse order of acquiring of the Connection.lock and some lower-level Netty locks, Connection.enqueueMesage() could deadlock if a ChannelDisconnected/ChannelClosed event arrived in the middle. The idea is to not hold the Connection.lock while invoking the Connection.sendCallToWire() method and, overall, avoid doing any calls to Netty while holding that lock. To test the changes, I ran the ITClient test via dist-test apllying Todd's WIP patch on top: https://gerrit.cloudera.org/#/c/7579/ The test passed 3572 out of 3572 times: http://dist-test.cloudera.org/job?job_id=aserbin.1503526685.24101 http://dist-test.cloudera.org/job?job_id=aserbin.1503527340.4787 http://dist-test.cloudera.org/job?job_id=aserbin.1503527848.6921 Change-Id: I1a0edc3e3accbcff60f2cde641ee470312bbd27a Reviewed-on: http://gerrit.cloudera.org:8080/7765 Tested-by: Kudu Jenkins Reviewed-by: Dan Burkert <danburk...@apache.org> Reviewed-by: Jean-Daniel Cryans <jdcry...@apache.org> --- M java/kudu-client/src/main/java/org/apache/kudu/client/Connection.java 1 file changed, 54 insertions(+), 21 deletions(-) Approvals: Dan Burkert: Looks good to me, but someone else must approve Jean-Daniel Cryans: Looks good to me, approved Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/7765 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1a0edc3e3accbcff60f2cde641ee470312bbd27a Gerrit-PatchSet: 6 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Dan Burkert <danburk...@apache.org> Gerrit-Reviewer: Jean-Daniel Cryans <jdcry...@apache.org> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon <t...@apache.org>