Exporter INCREMENT mode is not working. (#5220)
This commit is contained in:
parent
118e334e7c
commit
0146aa522f
|
|
@ -176,17 +176,17 @@ public class MetricsPersistentWorker extends PersistenceWorker<Metrics> {
|
|||
cachedMetrics.calculate();
|
||||
prepareRequests.add(metricsDAO.prepareBatchUpdate(model, cachedMetrics));
|
||||
nextWorker(cachedMetrics);
|
||||
|
||||
/*
|
||||
* The `data` should be not changed in any case. Exporter is an async process.
|
||||
*/
|
||||
nextExportWorker.ifPresent(exportEvenWorker -> exportEvenWorker.in(
|
||||
new ExportEvent(metrics, ExportEvent.EventType.INCREMENT)));
|
||||
} else {
|
||||
metrics.calculate();
|
||||
prepareRequests.add(metricsDAO.prepareBatchInsert(model, metrics));
|
||||
nextWorker(metrics);
|
||||
}
|
||||
|
||||
/*
|
||||
* The `metrics` should be not changed in all above process. Exporter is an async process.
|
||||
*/
|
||||
nextExportWorker.ifPresent(exportEvenWorker -> exportEvenWorker.in(
|
||||
new ExportEvent(metrics, ExportEvent.EventType.INCREMENT)));
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
log.error(t.getMessage(), t);
|
||||
|
|
|
|||
Loading…
Reference in New Issue