Hello Will Berkeley, Kudu Jenkins, Adar Dembo, I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/12112 to look at the new patch set (#5). Change subject: [util] use lighter locking scheme for ThreadMgr ...................................................................... [util] use lighter locking scheme for ThreadMgr Use the rw_spinlock primitive to guard the ThreadMgr's registry threads instead of Mutex. Also, use the shared lock pattern to for read-only access to the guarded entities of the ThreadMgr. In addition, do not hold the ThreadMgr's lock for the whole duration of generating the /threadz page for the embedded webserver. In addition, ThreadMgr now uses std::unordered_map as a container for category-specific thread information and enforces stricter consistency rules while adding/removing thread information from its registry. The latter caused issues with python multiprocessing, so I updated the code in test_scantoken.py to switch to serial execution of scan operations originated from serialized tokens. I haven't gotten to the bottom of it, but I think the problem of not calling thread cleanup routines upon exit/cancellation of a thread might be related to the fact that process and thread management exercised by python multiprocessing seems a bit weird. F or example, see the bug originated from the fact that multiprocessing exits the spawned processed by os._exit(), not sys.exit(): https://bugs.python.org/issue18966 Change-Id: I4d49c1c39392e01c45019844430a4fe3d116c277 --- M python/kudu/tests/test_scantoken.py M src/kudu/util/os-util.cc M src/kudu/util/thread.cc 3 files changed, 113 insertions(+), 115 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/12/12112/5 -- To view, visit http://gerrit.cloudera.org:8080/12112 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4d49c1c39392e01c45019844430a4fe3d116c277 Gerrit-Change-Number: 12112 Gerrit-PatchSet: 5 Gerrit-Owner: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Will Berkeley <wdberke...@gmail.com>