impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gabor Kaszab (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-1144: Fix exception when cancelling query in Impala-shell with CTRL-C
Date Wed, 15 Nov 2017 04:21:37 GMT
Hello Lars Volker, Laszlo Gaal, Michael Brown, Zoltan Borok-Nagy, Philip Zeyliger, David Knupp,
Attila Jeges, Tim Armstrong, Csaba Ringhofer, Dan Hecht, 

I'd like you to reexamine a change. Please visit

to look at the new patch set (#3).

Change subject: IMPALA-1144: Fix exception when cancelling query in Impala-shell with CTRL-C

IMPALA-1144: Fix exception when cancelling query in Impala-shell with CTRL-C

When query was cancelled via CTRL-C while Impala-shell was fetching the
query results then an exception was thrown from Impala backend saying
'Invalid query handle'. This was because one ImpalaClient was fetching
the results in a loop while another ImpalaClient cancelled the query on
the backend without letting the fetching client know that the query was
cancelled. As a result when the resources needed for fetching the results
were cleared from the backend the related ClientRequestState was not
found anymore.

As a solution query cancellation is indicated to ImpalaClient via a bool
member, and fetching stops if it indicates cancellation.

Another issue was that every time a query was cancelled a 'use db' command
was issued automatically. This happened to historical reasons but is not
needed anymore (see Jira for more details).

Tested manually starting with a select from a random table that has few
million rows. When the result rows started to show I hit CTRL+C to cancel
the query. Verified that the query stops, no error message, and no use
statement is executed.
After this I executed another random select query to see that fetching
still works and the cancellation indicator was reset successfully.

Change-Id: I6cefaf1dae78baae238289816a7cb9d210fb38e2
M shell/
M shell/
2 files changed, 6 insertions(+), 1 deletion(-)

  git pull ssh:// refs/changes/49/8549/3
To view, visit
To unsubscribe, visit

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6cefaf1dae78baae238289816a7cb9d210fb38e2
Gerrit-Change-Number: 8549
Gerrit-PatchSet: 3
Gerrit-Owner: Gabor Kaszab <>
Gerrit-Reviewer: Attila Jeges <>
Gerrit-Reviewer: Csaba Ringhofer <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: David Knupp <>
Gerrit-Reviewer: Lars Volker <>
Gerrit-Reviewer: Laszlo Gaal <>
Gerrit-Reviewer: Michael Brown <>
Gerrit-Reviewer: Philip Zeyliger <>
Gerrit-Reviewer: Tim Armstrong <>
Gerrit-Reviewer: Zoltan Borok-Nagy <>

  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message