[prev in list] [next in list] [prev in thread] [next in thread] 

List:       flume-dev
Subject:    [GitHub] [flume] bessbd commented on a change in pull request #320: Fix issues reported by SpotBugs 
From:       GitBox <git () apache ! org>
Date:       2020-04-13 20:32:18
Message-ID: 158680993869.14972.14805392008862511015.gitbox () gitbox ! apache ! org
[Download RAW message or body]

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:
users@infra.apache.org


With regards,
Apache Git Services


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic