You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@impala.apache.org by "Tim Armstrong (Code Review)" <ge...@cloudera.org> on 2016/04/28 18:25:44 UTC

[Impala-CR](cdh5-trunk) IMPALA-3433: Simplify global destructors

Tim Armstrong has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/2892

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/hdfs-lzo-text-scanner.cc
M be/src/exec/hdfs-lzo-text-scanner.h
M be/src/runtime/mem-tracker.cc
M be/src/runtime/mem-tracker.h
M be/src/util/periodic-counter-updater.cc
M be/src/util/periodic-counter-updater.h
6 files changed, 20 insertions(+), 27 deletions(-)


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

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