[kudu-CR] locks: add new read-write mutex

2016-06-25 Thread Adar Dembo (Code Review)
Adar Dembo has posted comments on this change.

Change subject: locks: add new read-write mutex
..


Patch Set 1: Verified+1

Overriding Jenkins, there was some inscrutable error in test setup for  
org.kududb.client.TestScanPredicate that is definitely not the doing of this 
patch.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I5462e69291fb9498ebd4aaa1728c64658667aa4b
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: Dan Burkert 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: No


[kudu-CR] locks: add new read-write mutex

2016-06-25 Thread Kudu Jenkins (Code Review)
Kudu Jenkins has posted comments on this change.

Change subject: locks: add new read-write mutex
..


Patch Set 1:

Build Started http://104.196.14.100/job/kudu-gerrit/1990/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I5462e69291fb9498ebd4aaa1728c64658667aa4b
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo 
Gerrit-Reviewer: Dan Burkert 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: No


[kudu-CR] locks: switch from boost::shared lock to kudu::shared lock

2016-06-25 Thread Kudu Jenkins (Code Review)
Kudu Jenkins has posted comments on this change.

Change subject: locks: switch from boost::shared_lock to kudu::shared_lock
..


Patch Set 1:

Build Started http://104.196.14.100/job/kudu-gerrit/1992/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I523cc09345b50f7ad9e6af0180493774246a9bf8
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo 
Gerrit-Reviewer: Dan Burkert 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: No


[kudu-CR] locks: add new read-write mutex

2016-06-25 Thread Adar Dembo (Code Review)
Hello Dan Burkert, Todd Lipcon,

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

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

to review the following change.

Change subject: locks: add new read-write mutex
..

locks: add new read-write mutex

The new mutex is a thin wrapper around pthread read/write locks. It has no
features of which to speak: no debugging hooks, no optimizations, nothing.

Take these rwlock-perf results with a grain of salt; they only test
read/read contention, not read/write or write/write contention. The values
are millions of cycles.

num_threads laptop_old laptop_new ve0518_old ve0518_new
---
1   26183 18982
2   1604   644914730
3   1504   9172204   1567
4   2398   1792   3185   2162
5   3210   2179   3943   2308
6   4070   2696   4135   2515
7   4741   3253   4557   2732
8   5457   3853   5114   3145

Change-Id: I5462e69291fb9498ebd4aaa1728c64658667aa4b
---
M src/kudu/experiments/rwlock-perf.cc
M src/kudu/util/CMakeLists.txt
A src/kudu/util/rw_mutex.cc
A src/kudu/util/rw_mutex.h
4 files changed, 115 insertions(+), 2 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5462e69291fb9498ebd4aaa1728c64658667aa4b
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo 
Gerrit-Reviewer: Dan Burkert 
Gerrit-Reviewer: Todd Lipcon 


[kudu-CR] locks: change kudu::shared lock constructor to pass by ref

2016-06-25 Thread Adar Dembo (Code Review)
Hello Dan Burkert, Todd Lipcon,

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

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

to review the following change.

Change subject: locks: change kudu::shared_lock constructor to pass by ref
..

locks: change kudu::shared_lock constructor to pass by ref

This is less Kudu-style friendly, but it'll make the (eventual) transition
to the C++14 std::shared_lock smoother, and it's also more consistent with
std::lock_guard.

Change-Id: I1e25a4f519f5cc09f08f8aeda5284eabdadd0c46
---
M src/kudu/client/meta_cache.cc
M src/kudu/fs/block_manager-stress-test.cc
M src/kudu/fs/log_block_manager.cc
M src/kudu/rpc/messenger.cc
M src/kudu/rpc/messenger.h
M src/kudu/rpc/rpcz_store.cc
M src/kudu/tablet/delta_tracker.cc
M src/kudu/tablet/transactions/write_transaction.cc
M src/kudu/util/locks.h
9 files changed, 20 insertions(+), 20 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e25a4f519f5cc09f08f8aeda5284eabdadd0c46
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo 
Gerrit-Reviewer: Dan Burkert 
Gerrit-Reviewer: Todd Lipcon 


[kudu-CR] locks: change kudu::shared lock constructor to pass by ref

2016-06-25 Thread Kudu Jenkins (Code Review)
Kudu Jenkins has posted comments on this change.

Change subject: locks: change kudu::shared_lock constructor to pass by ref
..


Patch Set 1:

Build Started http://104.196.14.100/job/kudu-gerrit/1991/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1e25a4f519f5cc09f08f8aeda5284eabdadd0c46
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo 
Gerrit-Reviewer: Dan Burkert 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: No


[kudu-CR] locks: switch from boost::shared mutex to new read-write mutex

2016-06-25 Thread Adar Dembo (Code Review)
Hello Dan Burkert, Todd Lipcon,

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

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

to review the following change.

Change subject: locks: switch from boost::shared_mutex to new read-write mutex
..

locks: switch from boost::shared_mutex to new read-write mutex

Here are the changed mutexes:
1. log allocation state lock. Only taken before and after segment
   preallocation, which doesn't seem like a hot path.
2. webserver lock: Protects the handler map and footer. Almost always
   uncontended, and the web UI is not a hot path anyway.
3. tablet status listener lock: Protects the last status seen. Almost always
   uncontended; it's acquired often by the remote bootstrap client, but the
   only other acquirer would be the web UI or ListTablets() RPC.
4. scanner manager stripe lock: Protects a particular stripe's scanner map.
   This one is a hot path with contention, I think.

Change-Id: I1b4b1df267468dc8c88c3de8e0345c61900576de
---
M src/kudu/consensus/log.cc
M src/kudu/consensus/log.h
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/tablet/tablet_bootstrap.cc
M src/kudu/tablet/tablet_bootstrap.h
M src/kudu/tserver/scanners.cc
M src/kudu/tserver/scanners.h
8 files changed, 24 insertions(+), 27 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b4b1df267468dc8c88c3de8e0345c61900576de
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo 
Gerrit-Reviewer: Dan Burkert 
Gerrit-Reviewer: Todd Lipcon 


[kudu-CR] locks: switch from boost::shared lock to kudu::shared lock

2016-06-25 Thread Adar Dembo (Code Review)
Hello Dan Burkert, Todd Lipcon,

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

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

to review the following change.

Change subject: locks: switch from boost::shared_lock to kudu::shared_lock
..

locks: switch from boost::shared_lock to kudu::shared_lock

This is just a change from one wrapper to another. The semantics are the
same; there should be no functional changes.

Change-Id: I523cc09345b50f7ad9e6af0180493774246a9bf8
---
M src/kudu/consensus/log.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/ts_manager.cc
M src/kudu/tablet/diskrowset.cc
M src/kudu/tablet/lock_manager.cc
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet.h
M src/kudu/tserver/ts_tablet_manager.cc
M src/kudu/tserver/ts_tablet_manager.h
M src/kudu/util/rw_semaphore-test.cc
10 files changed, 56 insertions(+), 64 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I523cc09345b50f7ad9e6af0180493774246a9bf8
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo 
Gerrit-Reviewer: Dan Burkert 
Gerrit-Reviewer: Todd Lipcon 


[kudu-CR] locks: stop using errno around base::NumCPUs and base::MaxCPUIndex

2016-06-25 Thread Kudu Jenkins (Code Review)
Kudu Jenkins has posted comments on this change.

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


Patch Set 1:

Build Started http://104.196.14.100/job/kudu-gerrit/1989/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7c048a5a541bd3bfd54f8ac4acc1dd9e379c47ad
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: No


[kudu-CR] locks: stop using errno around base::NumCPUs and base::MaxCPUIndex

2016-06-25 Thread Adar Dembo (Code Review)
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 
Gerrit-Reviewer: Todd Lipcon