[ 
https://issues.apache.org/jira/browse/IMPALA-9398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17096905#comment-17096905
 ] 

ASF subversion and git services commented on IMPALA-9398:
---------------------------------------------------------

Commit 1a36a0348b85c2b2008d7b4b3a061a467f8456e7 in impala's branch 
refs/heads/master from Tamas Mate
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=1a36a03 ]

IMPALA-9398: Fix shell history duplication when cmdloop breaks

This change adds a new condition to avoid re-reading the impala-shell
history when the cmdloop is broken. The loop can break due to exceptions
such as KeyboardInterrupt.

Testing:
 - The change was tested manually on local dev env
 - Added a new EE shell test to verify the history after SIGINT

Change-Id: If4faf46134f44d91e56748642f47d448707db53c
Reviewed-on: http://gerrit.cloudera.org:8080/15345
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>


> When pressing Ctrl+C the content of the shell history gets doubled
> ------------------------------------------------------------------
>
>                 Key: IMPALA-9398
>                 URL: https://issues.apache.org/jira/browse/IMPALA-9398
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Clients
>    Affects Versions: Impala 3.3.0
>            Reporter: Adam Tamas
>            Assignee: Tamas Mate
>            Priority: Trivial
>              Labels: impala-shell, ramp-up
>
> If Ctrl+C was pressed in the impala-shell, the content of the 
> ~/.impalahistory got copied into the end of the file for each instance the 
> Ctrl+C was pressed.
> The new queries written while the shell was open is not duplicated and the 
> file is only updated after the impala-shell was closed.
> Example:
> $ rm ~/.impalahistory
> $ impala-shell.sh
> impala> select 1; 
> impala> select 2; 
> impala> quit;
> $ cat -n ~/.impalahistory
>  1 select 1;
>  2 select 2;
>  3 quit;
> $ impala-shell.sh
> impala> ^C
> impala> quit;
> $ cat -n ~/.impalahistory
>  1 select 1;
>  2 select 2;
>  3 quit;
>  4 select 1;
>  5 select 2;
>  6 quit;
> The second impala-shell session, Ctrl-C doubled all the history entries.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to