Dan Burkert has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/9049 )

Change subject: Fix bug causing undercounting of thread count metric
......................................................................

Fix bug causing undercounting of thread count metric

Early in tserver startup a handful (~5) threads are created before
StartThreadInstrumentation is called, which causes the thread manager
not to count them in the thread count metrics.

I found this bug because it would cause the thread count metric to dip
below zero on tserver shutdown, since the uncounted threads would still
decrement the metric. The fix is straightfoward and simplifies the code:
threads should always update the thread count metrics, even if the
thread pool is not yet registered with the metric handler.

Change-Id: Icd36b5c7d0ed1e157c0960011e0d8e44e143c205
Reviewed-on: http://gerrit.cloudera.org:8080/9049
Reviewed-by: Todd Lipcon <[email protected]>
Tested-by: Kudu Jenkins
---
M src/kudu/util/thread.cc
1 file changed, 6 insertions(+), 17 deletions(-)

Approvals:
  Todd Lipcon: Looks good to me, approved
  Kudu Jenkins: Verified

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Icd36b5c7d0ed1e157c0960011e0d8e44e143c205
Gerrit-Change-Number: 9049
Gerrit-PatchSet: 2
Gerrit-Owner: Dan Burkert <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <[email protected]>

Reply via email to