You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Tamas Mate (Code Review)" <ge...@cloudera.org> on 2020/04/06 08:40:15 UTC

[Impala-ASF-CR] IMPALA-9398: Fix shell history duplication when cmdloop breaks

Tamas Mate has uploaded a new patch set (#4). ( http://gerrit.cloudera.org:8080/15345 )

Change subject: IMPALA-9398: Fix shell history duplication when cmdloop breaks
......................................................................

IMPALA-9398: Fix shell history duplication when cmdloop breaks

The duplication issue was due to calling the history file reading
readline method multiple times during the lifetime of an ImpalaShell.
Readline appends the content of the file after the already read history.
History was read in the Cmd.preloop() method which is called every time
when the Cmd.cmdloop() starts, the cmdloop() break and re-start could be
triggered by an exception for example KeyboardInterrupt in this case.

This change refactors the history file reading logic and moves it
outside of the preloop() method.

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
---
M shell/impala_shell.py
M tests/shell/test_shell_interactive.py
2 files changed, 43 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/45/15345/4
-- 
To view, visit http://gerrit.cloudera.org:8080/15345
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If4faf46134f44d91e56748642f47d448707db53c
Gerrit-Change-Number: 15345
Gerrit-PatchSet: 4
Gerrit-Owner: Tamas Mate <tm...@cloudera.com>
Gerrit-Reviewer: David Knupp <dk...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tamas Mate <tm...@cloudera.com>
Gerrit-Reviewer: Vincent Tran <vt...@cloudera.com>