influxdata / influxdata/influxdb-client-java
Timer task is disposed due to `restartTimerOnMaxSize` leading to data loss
- Dominant language
- Java
- Stars
- 477
- Forks
- 129
- PR merge metrics
- No merged PRs in 30d
Description
__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
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with client/src/main/java/com/influxdb/client/internal/flowable/FlowableBufferTimedFlushable.java at the referenced lines, then reproduce the case by submitting data quickly while the buffer is full. Confirm that the timer task is not disposed during an active flush and that the resulting behavior no longer leads to data loss or issue #793.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100