Hello Todd Lipcon,

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

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

to review the following change.

Change subject: locks: stop using errno around base::NumCPUs and 
base::MaxCPUIndex
......................................................................

locks: stop using errno around base::NumCPUs and base::MaxCPUIndex

It's not clear why we ever did this. InitializeSystemInfo() doesn't
explicitly set errno itself, nor does it clear it in the event of an ignored
error (e.g. ReadIntFromFile() on a file that doesn't exist).

Without this fix, I consistently get the following when I run rwlock-perf:

        Test   Threads  Cycles
------------------------------
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0625 12:20:24.620546 12138 locks.h:163] Check failed: (*__errno_location ()) 
== 0 (2 vs. 0) No such file or directory
*** Check failure stack trace: ***

Amusingly, I only see this in release builds because in a dynamically linked
rwperf-test the very first call to InitializeSystemInfo() (subsequent calls
are cached) takes place in a location that doesn't check errno upon return.

Change-Id: I7c048a5a541bd3bfd54f8ac4acc1dd9e379c47ad
---
M src/kudu/consensus/log_index.cc
M src/kudu/experiments/rwlock-perf.cc
M src/kudu/rpc/negotiation.cc
M src/kudu/util/locks.h
4 files changed, 13 insertions(+), 14 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7c048a5a541bd3bfd54f8ac4acc1dd9e379c47ad
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>

Reply via email to