impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Armstrong (Code Review)" <>
Subject [Impala-CR](cdh5-trunk) IMPALA-3433: Simplify global destructors
Date Thu, 28 Apr 2016 16:25:44 GMT
Tim Armstrong has uploaded a new change for review.

Change subject: IMPALA-3433: Simplify global destructors

IMPALA-3433: Simplify global destructors

This patch aims to simplify process teardown by reducing the work that
global destructors do and avoid potential delays and exceptions that
could leave the process in a weird state.

Don't try to tear down periodic counter thread: it will be terminated
anyway and can cause delays in tearing down the process.

Use a SpinLock instead of mutexes for global locks. Boost mutexes have a
destructor that invalidates the lock, which can cause races if other
threads try to lock or unlock the lock.

Based on some limited testing, this speeds up process shutdown greatly
and avoids exceptions being thrown. On a run before this patch, process
shutdown frequently took 100+ seconds. After this patch, it completed
consistently in < 1s.

Change-Id: I2cc3a4c53811f6a18c2a6010c3541ca149e5672c
M be/src/exec/
M be/src/exec/hdfs-lzo-text-scanner.h
M be/src/runtime/
M be/src/runtime/mem-tracker.h
M be/src/util/
M be/src/util/periodic-counter-updater.h
6 files changed, 20 insertions(+), 27 deletions(-)

  git pull ssh:// refs/changes/92/2892/1
To view, visit
To unsubscribe, visit

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2cc3a4c53811f6a18c2a6010c3541ca149e5672c
Gerrit-PatchSet: 1
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Tim Armstrong <>

View raw message