Qifan Chen has posted comments on this change. ( http://gerrit.cloudera.org:8080/16408 )
Change subject: IMPALA-10129 Data race in MemTracker::GetTopNQueriesAndUpdatePoolStats ...................................................................... Patch Set 4: (1 comment) http://gerrit.cloudera.org:8080/#/c/16408/4/be/src/runtime/mem-tracker.h File be/src/runtime/mem-tracker.h: http://gerrit.cloudera.org:8080/#/c/16408/4/be/src/runtime/mem-tracker.h@97 PS4, Line 97: bool is_query_mem_tracker = false, const TUniqueId& query_id = TUniqueId()); > is it necessary for these parameters to all have default values? creating a In the enhancement, only two data members are getting the initial values from the initializing list. Without doing so, the MemTracker object will be constructed in two steps which allows another thread to modify the object (a race) in between. On paper, TUniqueId() is exactly the same object for query_id_ upon the construction of MemTracker, when no query_id object is passed in the initializing list. The addition of it allows a known query_id to be passed to the cstr. -- To view, visit http://gerrit.cloudera.org:8080/16408 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9c4ffe8064d3e099a525cc48c218ef73112fb67b Gerrit-Change-Number: 16408 Gerrit-PatchSet: 4 Gerrit-Owner: Qifan Chen <qc...@cloudera.com> Gerrit-Reviewer: Bikramjeet Vig <bikramjeet....@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Qifan Chen <qc...@cloudera.com> Gerrit-Reviewer: Sahil Takiar <stak...@cloudera.com> Gerrit-Comment-Date: Thu, 03 Sep 2020 18:05:50 +0000 Gerrit-HasComments: Yes