You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2020/08/11 04:06:43 UTC
[impala] 01/02: IMPALA-10039: Fixed Expr-test crash caused by
thread unsafe function
This is an automated email from the ASF dual-hosted git repository.
tarmstrong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
commit 99443559bd701275ab53c7b7daa5ce1d144f0d49
Author: wzhou-code <wz...@cloudera.com>
AuthorDate: Wed Aug 5 22:00:36 2020 -0700
IMPALA-10039: Fixed Expr-test crash caused by thread unsafe function
Recent patch for IMPALA-5746 registers a callback function for the
updating of cluster membership. The callback function cancels the
queries scheduled by the failed coordinators. This callback function
was called during Expr-test and caused crash.
This patch checks if the process running for tests and only registers
the callback function if it's not running for BE/FE tests.
Testing:
- The issue could be reproduced by running expr-test for 10-20
iterations. Verified the fixing by running expr-test over 1000
iterations without crash.
- Passed TestProcessFailures::test_kill_coordinator.
- Passed core tests.
Change-Id: I85245bf4bffb469913d53741847e67773b7d4627
Reviewed-on: http://gerrit.cloudera.org:8080/16299
Reviewed-by: Thomas Tauber-Marshall <tm...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
be/src/runtime/exec-env.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/be/src/runtime/exec-env.cc b/be/src/runtime/exec-env.cc
index 063622c..9c1e15b 100644
--- a/be/src/runtime/exec-env.cc
+++ b/be/src/runtime/exec-env.cc
@@ -574,7 +574,7 @@ void ExecEnv::SetImpalaServer(ImpalaServer* server) {
server->CancelQueriesOnFailedBackends(current_backend_set);
});
}
- if (FLAGS_is_executor) {
+ if (FLAGS_is_executor && !TestInfo::is_test()) {
cluster_membership_mgr_->RegisterUpdateCallbackFn(
[](ClusterMembershipMgr::SnapshotPtr snapshot) {
std::unordered_set<BackendIdPB> current_backend_set;