impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Impala Public Jenkins (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-5130: fix race in MemTracker::EnableReservationReporting()
Date Thu, 30 Mar 2017 00:17:25 GMT
Impala Public Jenkins has submitted this change and it was merged.

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
Reviewed-on: http://gerrit.cloudera.org:8080/6502
Reviewed-by: Dan Hecht <dhecht@cloudera.com>
Tested-by: Impala Public Jenkins
---
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(-)

Approvals:
  Impala Public Jenkins: Verified
  Dan Hecht: Looks good to me, approved



-- 
To view, visit http://gerrit.cloudera.org:8080/6502
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2434c952d97c46040e29fca2327c244dd30599d2
Gerrit-PatchSet: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <tarmstrong@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhecht@cloudera.com>
Gerrit-Reviewer: Henry Robinson <henry@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Tim Armstrong <tarmstrong@cloudera.com>

Mime
View raw message