impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henry Robinson (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-4905: Reduce coordinator lock contention in RPC handler
Date Fri, 10 Feb 2017 23:57:29 GMT
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

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

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/
M be/src/runtime/coordinator.h
M be/src/runtime/
3 files changed, 61 insertions(+), 44 deletions(-)

  git pull ssh:// refs/changes/71/5971/2
To view, visit
To unsubscribe, visit

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id7599780785c4e9306711f535bf4726a247873e2
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Henry Robinson <>
Gerrit-Reviewer: Henry Robinson <>
Gerrit-Reviewer: Sailesh Mukil <>

View raw message