Attila Bukor has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/16201 )

Change subject: KUDU-1422 resize ErrorCollector
......................................................................


Patch Set 3:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/16201/2/java/kudu-client/src/main/java/org/apache/kudu/client/ErrorCollector.java
File java/kudu-client/src/main/java/org/apache/kudu/client/ErrorCollector.java:

http://gerrit.cloudera.org:8080/#/c/16201/2/java/kudu-client/src/main/java/org/apache/kudu/client/ErrorCollector.java@34
PS2, Line 34:   private volatile int maxCapacity;
> Let's say thread A creates a ErrorCollector object E and passes E's referen
Even if there's no direct happens-before link between A and B, there is one due 
to the transitiveness of happens-before relations. JVM guarantees that other 
threads can't access an object until the constructor has completed, so 
assigning the initial value in the constructor happens before any access to 
this object, so there's no need for the volatile here. Constructors can't be 
synchronized because of this.


http://gerrit.cloudera.org:8080/#/c/16201/2/java/kudu-client/src/main/java/org/apache/kudu/client/ErrorCollector.java@89
PS2, Line 89:   synchronized void resize(int size) {
shouldn't this be public?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I53731f6367aa84d6435b3bf2143e86164c8eaa1e
Gerrit-Change-Number: 16201
Gerrit-PatchSet: 3
Gerrit-Owner: Anonymous Coward <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Anonymous Coward <[email protected]>
Gerrit-Reviewer: Attila Bukor <[email protected]>
Gerrit-Reviewer: Grant Henke <[email protected]>
Gerrit-Reviewer: Greg Solovyev <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Fri, 17 Jul 2020 08:07:52 +0000
Gerrit-HasComments: Yes

Reply via email to