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

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


Patch Set 3:

(1 comment)

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;
> I don't think we need volatile and synchronized. It's usually one or the ot
I don't think it's a good idea to pass 'this' to a new thread in the 
constructor, so I wouldn't protect maxCapacity against this scenario, as it 
will likely never happen. If in the future someone decide we need to pass 
'this' to another thread from the constructor, we might need to rethink if 
maxCapacity should be a volatile, but until then it's unnecessary and it also 
has a perf impact as every read has to access main memory instead of the CPU 
cache.



--
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: Mon, 20 Jul 2020 11:37:18 +0000
Gerrit-HasComments: Yes

Reply via email to