bessbd commented on a change in pull request #320: Fix issues reported by SpotBugs in ElasticSearch sink URL: https://github.com/apache/flume/pull/320#discussion_r407703334
########## File path: flume-ng-sinks/flume-ng-elasticsearch-sink/src/main/java/org/apache/flume/sink/elasticsearch/client/ElasticSearchRestClient.java ########## @@ -105,7 +105,7 @@ public void addEvent(Event event, IndexNameBuilder indexNameBuilder, String inde parameters.put(INDEX_OPERATION_NAME, indexParameters); Gson gson = new Gson(); - synchronized (bulkBuilder) { Review comment: Looking at this PR, all changes seem awesome to me, but this one (and the one after - same `synchronized (this)`) seems to alter semantics. What do you think about going one step further and making `bulkBuilder` a `StringBuffer` instead of a `StringBuilder` so that the thread-safety of `StringBuffer` is leveraged? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services