Skip to content

Commit

Permalink
Merge a488a49 into 7b3eb46
Browse files Browse the repository at this point in the history
  • Loading branch information
coolbeevip committed Aug 15, 2019
2 parents 7b3eb46 + a488a49 commit c39d670
Showing 1 changed file with 6 additions and 6 deletions.
Expand Up @@ -89,12 +89,12 @@ public ElasticsearchTransactionRepository(

@Override
public void send(GlobalTransaction transaction) throws Exception {
long begin = System.currentTimeMillis();
queries.add(convert(transaction));
batchSizeCounter++;
metricsService.metrics().doRepositoryReceived();
if (batchSize == 0 || batchSizeCounter == batchSize) {
synchronized (lock) {
synchronized (lock) {
long begin = System.currentTimeMillis();
queries.add(convert(transaction));
batchSizeCounter++;
metricsService.metrics().doRepositoryReceived();
if (batchSize == 0 || batchSizeCounter == batchSize) {
save(begin);
batchSizeCounter = 0;
}
Expand Down

0 comments on commit c39d670

Please sign in to comment.