You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kudu.apache.org by "Todd Lipcon (Code Review)" <ge...@ip-10-146-233-104.ec2.internal> on 2016/01/21 22:52:54 UTC

[kudu-CR] KUDU-1290. Fix CHECK failures when some CPUs are disabled

Hello Dan Burkert,

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

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

to review the following change.

Change subject: KUDU-1290. Fix CHECK failures when some CPUs are disabled
......................................................................

KUDU-1290. Fix CHECK failures when some CPUs are disabled

This adds a new function base::MaxCPUID() which uses
/sys/devices/system/cpu/present to determine which CPUs are present on the
system. This is an alternative to base::NumCPUs() which doesn't count any CPUs
which have been administratively disabled.

The few places where we use CPU ID to index into a collection are changed
to use this new API.

I verified that, if I disabled one of my CPUs, the master crashed a few minutes
after startup without the patch. With the patch, it seems stable.

Change-Id: I7959e87aba4a694b60ee36adddfd32fef631d8aa
---
M src/kudu/cfile/bloomfile.cc
M src/kudu/gutil/sysinfo.cc
M src/kudu/gutil/sysinfo.h
M src/kudu/util/locks.h
4 files changed, 65 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/64/1864/1
-- 
To view, visit http://gerrit.cloudera.org:8080/1864
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7959e87aba4a694b60ee36adddfd32fef631d8aa
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Dan Burkert <da...@cloudera.com>