mirror of
https://github.com/apache/impala.git
synced 2025-12-25 11:04:13 -05:00
To cancel a query, the shell will create a separate connection inside it's SIGINT handler, and send the cancellation RPC. However this connection did not start a secure connection if it needed to, meaning that the cancellation attempt would just hang. A workaround is to kill the shell process, which I expect is what users have been doing with this bug which has been around since 2014. Testing: I added a custom cluster test that starts Impala with SSL enabled, and wrote two tests - one just to check SSL connectivity, and the other to mimic the existing test_cancellation which sends SIGINT to the shell process. In doing so I refactored the shell testing code a bit so that all tests use a single ImpalaShell object, rather than rolling their own Popen() based approaches when they needed to do something unusual, like cancel a query. In the cancellation test on my machine, SIGINT can take a few tries to be effective. I'm not sure if this is a timing thing - perhaps the Python interpreter doesn't correctly pass signals through to a handler if it's in a blocking call, for example. The test reliably passes within ~5 tries on my machine, so the test tries 30 times, once per second. Change-Id: If99085e75708d92a08dbecf0131a2234fedad33a Reviewed-on: http://gerrit.cloudera.org:8080/3302 Reviewed-by: Henry Robinson <henry@cloudera.com> Tested-by: Henry Robinson <henry@cloudera.com>
2 lines
74 B
Python
2 lines
74 B
Python
# This file is needed to make the files in this directory a python module
|