Wenzhe Zhou has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/16437


Change subject: WIP IMPALA-10154: Fix data race on coord_backend_id in TSAN 
build
......................................................................

WIP IMPALA-10154: Fix data race on coord_backend_id in TSAN build

This issue was introduced by the patch for IMPALA-5746.
QueryState::exec_rpc_params_.coord_backend_id is only valid after
QuestState::Init() is called, but it could be accessed by QueryExecMgr
object in QueryExecMgr::CancelQueriesForFailedCoordinators() before or
during QueryState::Init() is called, hence cause data race.
To fix it, move coord_backend_id from class ExecQueryFInstancesRequestPB
to class TQueryCtx. QueryState::query_ctx_ is set in QueryState
constructor so that QueryState::query_ctx_.coord_backend_id is valid
once the QuestState object is created.

Testing:
 - Passed tests/custom_cluster/test_process_failures.py.
 - Passed the core test.
 - TODO the core tests against a TSAN build.

Change-Id: I1c4b51e741a28b80bf3485adff8c97aabe0a3f67
---
M be/src/runtime/coordinator-backend-state.cc
M be/src/runtime/query-exec-mgr.cc
M be/src/runtime/query-state.cc
M be/src/runtime/query-state.h
M be/src/runtime/test-env.cc
M be/src/service/impala-server.cc
M common/protobuf/control_service.proto
M common/thrift/ImpalaInternalService.thrift
8 files changed, 15 insertions(+), 11 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/37/16437/1
--
To view, visit http://gerrit.cloudera.org:8080/16437
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1c4b51e741a28b80bf3485adff8c97aabe0a3f67
Gerrit-Change-Number: 16437
Gerrit-PatchSet: 1
Gerrit-Owner: Wenzhe Zhou <[email protected]>
Gerrit-Reviewer: Sahil Takiar <[email protected]>
Gerrit-Reviewer: Thomas Tauber-Marshall <[email protected]>

Reply via email to