Added a sleep of 3 milliseconds to slow down the record read so mitigate
the overload on couchbase
This commit is contained in:
parent
653dd085ba
commit
e730349f8d
|
@ -5,6 +5,7 @@ import java.text.DateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import org.gcube.accounting.aggregator.status.AggregationState;
|
import org.gcube.accounting.aggregator.status.AggregationState;
|
||||||
import org.gcube.accounting.aggregator.status.AggregationStatus;
|
import org.gcube.accounting.aggregator.status.AggregationStatus;
|
||||||
|
@ -236,6 +237,7 @@ public class Aggregator {
|
||||||
for(int i=1; i<=MAX_RETRY; i++){
|
for(int i=1; i<=MAX_RETRY; i++){
|
||||||
try {
|
try {
|
||||||
originalRecordsCounter = elaborateRow(row, aggregatorBuffer, originalRecordsCounter);
|
originalRecordsCounter = elaborateRow(row, aggregatorBuffer, originalRecordsCounter);
|
||||||
|
TimeUnit.MILLISECONDS.sleep(3);
|
||||||
break;
|
break;
|
||||||
}catch (RuntimeException e) {
|
}catch (RuntimeException e) {
|
||||||
if(i==2){
|
if(i==2){
|
||||||
|
|
Loading…
Reference in New Issue