impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tianyi Wang (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-5416: Fix an impala-shell command recursion bug
Date Thu, 14 Sep 2017 23:14:03 GMT
Tianyi Wang has posted comments on this change.

Change subject: IMPALA-5416: Fix an impala-shell command recursion bug

Patch Set 2:

(1 comment)

> Can this be tested in tests/shell/

Sure. A test case is extended.
Commit Message:

PS2, Line 12: The cause is that there is a "cmdqueue" member in cmd library, which is
            : used to execute commands not directly from user input. When impala-shell
            : reads a line with multiple commands, it splits the line into multiple
            : queries and insert them into the queue, and then gives control back to
            : the eventloop in cmd library. The problem is that a source command
            : calls execute_query_list(), which executes queries in the cmdqueue as
            : well. So any query in the cmdqueue will be executed twice. And if there
            : is unfortunately a source command in the cmdqueue, it will call
            : execute_query_list() again, and there will be an infinite recursion.
            : The original purpose of running queued queries in execute_query_list()
            : is that in non-interactive mode, there is no event loop. And still,
            : there are queries like "use database" queued by connection setup
            : procedures, which need to be run before the user query.
            : This patch avoids running queries from the queue in
            : execute_query_list(), and for non-interactive mode, runs queued queries
            : in execute_queries_non_interactive_mode() instead.
> Thanks for the explanation.
Thanks for the suggestion. Commit message updated.

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I453af2d4694d47e184031cb07ecd2af259ba20f3
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tianyi Wang <>
Gerrit-Reviewer: Philip Zeyliger <>
Gerrit-Reviewer: Thomas Tauber-Marshall <>
Gerrit-Reviewer: Tianyi Wang <>
Gerrit-HasComments: Yes

View raw message