Todd Lipcon has posted comments on this change.

Change subject: KUDU-2053. Fix race in Java RequestTracker
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7494/1/java/kudu-client/src/main/java/org/apache/kudu/client/RequestTracker.java
File java/kudu-client/src/main/java/org/apache/kudu/client/RequestTracker.java:

Line 67:     synchronized (lock) {
> Worth considering a RWLock?
I think the ratio of firstIncomplete (read-only) to newSeqNo/rpcCompleted 
(write) is actually <1.0, so don't think there is much benefit to be gained. 
One potential improvement if we see any contention here would be to have a 
single method like 'void initHeader(RequestHeaderPB pb)' which inits both the 
seq num and the firstIncomplete under a single lock acquisition (instead of 
two) but I'm going to hand-wave here and say that if it's beneficial the JVM is 
already equipped to do lock coarsening here 
(https://shipilev.net/jvm-anatomy-park/1-lock-coarsening-for-loops/)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I56f3d1ac85d34ca663e5b6378ff8362846a2424a
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: David Ribeiro Alves <[email protected]>
Gerrit-Reviewer: Jean-Daniel Cryans <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <[email protected]>
Gerrit-HasComments: Yes

Reply via email to