influxdb-client-java icon indicating copy to clipboard operation
influxdb-client-java copied to clipboard

Timer task is disposed due to `restartTimerOnMaxSize` leading to data loss

Open OrezzerO opened this issue 10 months ago • 0 comments
trafficstars

Steps to reproduce:

  1. Submit data fast enough,
  2. If timer is running while buffer is full ,timer task will be disposed.

We can see it in : https://github.com/influxdata/influxdb-client-java/blob/d641b1163986f90dbcc2d1275fceff698636882d/client/src/main/java/com/influxdb/client/internal/flowable/FlowableBufferTimedFlushable.java#L156-L196

This bug will lead to #793. I think setting restartTimerOnMaxSize to false will be a good choice. Or we can add a flag when task is running and do not dispose the timer task.

Specifications:

  • Client Version: 6.7.0
  • InfluxDB Version: 2.6.1
  • JDK Version: 11
  • Platform: linux

OrezzerO avatar Jan 10 '25 07:01 OrezzerO