Riza Suminto has posted comments on this change. ( http://gerrit.cloudera.org:8080/21383 )
Change subject: IMPALA-13040: Add waiting mechanism in UpdateFilterFromRemote ...................................................................... Patch Set 5: (1 comment) http://gerrit.cloudera.org:8080/#/c/21383/5/be/src/runtime/query-state.h File be/src/runtime/query-state.h: http://gerrit.cloudera.org:8080/#/c/21383/5/be/src/runtime/query-state.h@328 PS5, Line 328: BackendExecState exec_state = backend_exec_state_; > Shouldn't this be atomic if we need to worry about it's value changing? Or backend_exec_state_ can only transition to terminal state once and wont revert back. This is just to ensure that we are comparing 1 constant value for 3 times below rather than checking against backend_exec_state_ that might be modified in between three checks (say, backend_exec_state_lock_ is changing from EXECUTING to FINISHED when in the middle of backend_exec_state_ == ERROR check). I don't think obtaining backend_exec_state_lock_ is necessary because it will release the lock anyway when applying runtime filter update. Existing codes in query-state.cc also call IsTerminalState() without holding lock. -- To view, visit http://gerrit.cloudera.org:8080/21383 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I156d1f0c694b91ba34be70bc53ae9bacf924b3b9 Gerrit-Change-Number: 21383 Gerrit-PatchSet: 5 Gerrit-Owner: Riza Suminto <riza.sumi...@cloudera.com> Gerrit-Reviewer: Csaba Ringhofer <csringho...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com> Gerrit-Reviewer: Kurt Deschler <kdesc...@cloudera.com> Gerrit-Reviewer: Michael Smith <michael.sm...@cloudera.com> Gerrit-Reviewer: Riza Suminto <riza.sumi...@cloudera.com> Gerrit-Comment-Date: Wed, 08 May 2024 20:35:34 +0000 Gerrit-HasComments: Yes