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 <[email protected]> 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 <[email protected]> Gerrit-Reviewer: Dan Hecht <[email protected]> Gerrit-Reviewer: Henry Robinson <[email protected]> Gerrit-Reviewer: Impala Public Jenkins Gerrit-Reviewer: Tim Armstrong <[email protected]>
