influxdb-client-java
influxdb-client-java copied to clipboard
Timer task is disposed due to `restartTimerOnMaxSize` leading to data loss
trafficstars
Steps to reproduce:
- Submit data fast enough,
- 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