Jason Fehr has posted comments on this change. ( http://gerrit.cloudera.org:8080/21744 )
Change subject: IMPALA-13347: Fixes TSAN Thread Leak of Workload Management Thread ...................................................................... Patch Set 5: (7 comments) http://gerrit.cloudera.org:8080/#/c/21744/2//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/21744/2//COMMIT_MSG@10 PS2, Line 10: in impala-server.h. This thread runs until a graceful shutdown is > nit: unnecessary double space. Same on the next line. Done http://gerrit.cloudera.org:8080/#/c/21744/2//COMMIT_MSG@11 PS2, Line 11: initiate > nit: initiated Done http://gerrit.cloudera.org:8080/#/c/21744/2/be/src/service/workload-management.h File be/src/service/workload-management.h: http://gerrit.cloudera.org:8080/#/c/21744/2/be/src/service/workload-management.h@101 PS2, Line 101: kload management in > nit: workload management setup Done http://gerrit.cloudera.org:8080/#/c/21744/2/be/src/service/workload-management.h@108 PS2, Line 108: finished o > nit: finished or Done http://gerrit.cloudera.org:8080/#/c/21744/2/be/src/service/workload-management.cc File be/src/service/workload-management.cc: http://gerrit.cloudera.org:8080/#/c/21744/2/be/src/service/workload-management.cc@118 PS2, Line 118: completed_queries_cv_.notify_all(); > I'm not quite sure how this works. It holds workload_mgmt_threadstate_mu_ a The condition variable releases the unique_lock while it's waiting. It retakes the unique_lock before the predicate function runs and releases it after the predicate completes. Once the wait finishes, it takes the unique_lock before return ing from the wait_for() function. Thus, the workload_mgmt_thread_state_ can be updated only while the condition variable is waiting. http://gerrit.cloudera.org:8080/#/c/21744/2/be/src/service/workload-management.cc@127 PS2, Line 127: se NOT_STARTED: > Add DCHECK not nullptr. Done http://gerrit.cloudera.org:8080/#/c/21744/2/be/src/service/workload-management.cc@130 PS2, Line 130: se SHUTDOWN: > Will we miss logging some queries into query log table if this happen? Yes. I added logging of the completed queries queued metric which will give a maximum number of queries lost. I don't want to check the in-memory queue size because taking its lock may cause a hang at the code that timed out could still be running and holding the lock. -- To view, visit http://gerrit.cloudera.org:8080/21744 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1e95967bb6e04470a8900c9ba69080eea8aaa25e Gerrit-Change-Number: 21744 Gerrit-PatchSet: 5 Gerrit-Owner: Jason Fehr <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Jason Fehr <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Riza Suminto <[email protected]> Gerrit-Comment-Date: Wed, 04 Sep 2024 00:23:34 +0000 Gerrit-HasComments: Yes
