Henry Robinson has uploaded a new patch set (#2).

Change subject: IMPALA-4905: Reduce coordinator lock contention in RPC handler
......................................................................

IMPALA-4905: Reduce coordinator lock contention in RPC handler

Fragment instances call ReportExecStatus every few seconds, so there are
often very many of those RPCs in flight. The handler in
Coordinator::UpdateFragmentExecStatus() would try and take the shared
coordinator lock twice, once to merge in any insert file move operations
to be performed, and once to print all the other instance state's
status.

There was also a bug where the insert-merge branch would always be
taken (and so would the lock) even if the query was not an INSERT
statement.

This patch refactors UpdateFragmentExecStatus() so that it never takes
the coordinator lock. Instead, the insert updates are saved in the
fragment instance state to be merged during finalization. The logging is
now done without taking the coordinator lock unnecessarily, and also
avoid taking the fragment instance state locks since done() can be read
safely without synchronization on x86.

Change-Id: Id7599780785c4e9306711f535bf4726a247873e2
---
M be/src/runtime/coordinator.cc
M be/src/runtime/coordinator.h
M be/src/runtime/fragment-instance-state.cc
3 files changed, 61 insertions(+), 44 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/71/5971/2
-- 
To view, visit http://gerrit.cloudera.org:8080/5971
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id7599780785c4e9306711f535bf4726a247873e2
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Sailesh Mukil <sail...@cloudera.com>

Reply via email to