You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Dan Burkert (Code Review)" <ge...@cloudera.org> on 2018/01/18 02:09:49 UTC

[kudu-CR] Fix bug causing undercounting of thread count metric

Hello Adar Dembo, Todd Lipcon,

I'd like you to do a code review. Please visit

    http://gerrit.cloudera.org:8080/9049

to review the following change.


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
---
M src/kudu/util/thread.cc
1 file changed, 6 insertions(+), 17 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/49/9049/1
-- 
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: newchange
Gerrit-Change-Id: Icd36b5c7d0ed1e157c0960011e0d8e44e143c205
Gerrit-Change-Number: 9049
Gerrit-PatchSet: 1
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] Fix bug causing undercounting of thread count metric

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change. ( http://gerrit.cloudera.org:8080/9049 )

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


Patch Set 1: Code-Review+2


-- 
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: comment
Gerrit-Change-Id: Icd36b5c7d0ed1e157c0960011e0d8e44e143c205
Gerrit-Change-Number: 9049
Gerrit-PatchSet: 1
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Thu, 18 Jan 2018 02:11:03 +0000
Gerrit-HasComments: No

[kudu-CR] Fix bug causing undercounting of thread count metric

Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
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 <to...@apache.org>
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 <da...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>