Csaba Ringhofer has posted comments on this change. ( http://gerrit.cloudera.org:8080/23416 )
Change subject: IMPALA-14426: Deflake TestImpalaShell.test_cancellation ...................................................................... Patch Set 2: Code-Review+1 (2 comments) http://gerrit.cloudera.org:8080/#/c/23416/2//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/23416/2//COMMIT_MSG@7 PS2, Line 7: Deflake TestImpalaShell.test_cancellation Is this really just a test issue? Can't we have problems (at least not informative error message) when using impala-shell in Python 3 and pressing CTRL+c ? http://gerrit.cloudera.org:8080/#/c/23416/2/shell/impala_shell/impala_shell.py File shell/impala_shell/impala_shell.py: http://gerrit.cloudera.org:8080/#/c/23416/2/shell/impala_shell/impala_shell.py@740 PS2, Line 740: new_imp_client = self._new_impala_client() : new_imp_client.connect() : try: : new_imp_client.cancel_query(self.last_query_handle) : new_imp_client.close_query(self.last_query_handle) Can't we have other similar issues if these functions do some logging? There is already a TODO in line 733 about thread safety. I think that it would be better to start another thread to cancel the query: 1. start a new thread to cancel the query 2. raise KeyboardInterrupt() 3. in the code that catches KeyboardInterrupt wait for the cancellation to finish before doing something new I am ok with not doing this in the current patch, but the commit message should not that this is just a quick fix. -- To view, visit http://gerrit.cloudera.org:8080/23416 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5403c7b8126b1a35ea841496fdfb6eb93e83376e Gerrit-Change-Number: 23416 Gerrit-PatchSet: 2 Gerrit-Owner: Riza Suminto <riza.sumi...@cloudera.com> Gerrit-Reviewer: Csaba Ringhofer <csringho...@cloudera.com> Gerrit-Reviewer: Daniel Vanko <dva...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Noemi Pap-Takacs <npaptak...@cloudera.com> Gerrit-Reviewer: Riza Suminto <riza.sumi...@cloudera.com> Gerrit-Comment-Date: Fri, 12 Sep 2025 07:02:47 +0000 Gerrit-HasComments: Yes