impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Armstrong (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-5130: fix race in MemTracker::EnableReservationReporting()
Date Wed, 29 Mar 2017 16:04:09 GMT
Hello Henry Robinson,

I'd like you to reexamine a change.  Please visit

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

to look at the new patch set (#2).

Change subject: IMPALA-5130: fix race in MemTracker::EnableReservationReporting()
......................................................................

IMPALA-5130: fix race in MemTracker::EnableReservationReporting()

MemTracker::LogUsage() and MemTracker::EnableReservationReporting()
could race, with LogUsage() seeing a partially-constructed
'reservation_counters_' value and crashing.

This patch fixes that issue by atomically swapping in
'reservation_counters_' so that no threads see a
partially-constructed value.

While we're here, swap boost::mutex for the higher-performance
SpinLock for 'child_trackers_lock_'.

Change-Id: I2434c952d97c46040e29fca2327c244dd30599d2
---
M be/src/common/atomic.h
M be/src/runtime/mem-tracker.cc
M be/src/runtime/mem-tracker.h
3 files changed, 38 insertions(+), 16 deletions(-)


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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2434c952d97c46040e29fca2327c244dd30599d2
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <tarmstrong@cloudera.com>
Gerrit-Reviewer: Henry Robinson <henry@cloudera.com>

Mime
View raw message