influxdata / influxdata/influxdb-client-java
Retention policy error
- Dominant language
- Java
- Stars
- 477
- Forks
- 129
- PR merge metrics
- No merged PRs in 30d
Description
Hi there,
There are some 'retention policy' errors. Can someone tell me what is wrong? Especially the third/forth step?
Thank you very much.
Steps to reproduce:
List the minimal actions needed to reproduce the behavior.
1, setup InfluxDB version 2.7.1 on cloud VM;
2, setup a Java Spring program with Influxdb-client-java version 6.9.0;
**3, setup the Bucket retention policy to 7 days;
4, the _time of Point is three hours ahead of UTC;**
5, run this program for at last a week, there are some 'retention policy' errors.
Client Version:
Influxdb-client-java 6.9.0
InfluxDB Version: 2.7.1
JDK Version: JDK 8
Platform: Linux
Expected behavior:
There are no 'retention policy' errors.
error logs:
```
2023-07-03 05:24:04,262 ERROR [RxNewThreadScheduler-1] com.influxdb.client.write.events.WriteErrorEvent: The error occurred during writing of data
com.influxdb.exceptions.UnprocessableEntityException: HTTP status code: 422; Message: failure writing points to database: partial write: points beyond retention policy dropped=1
at com.influxdb.internal.AbstractRestClient.responseToError(AbstractRestClient.java:133)
at com.influxdb.internal.AbstractRestClient.toInfluxException(AbstractRestClient.java:99)
at com.influxdb.client.internal.AbstractWriteClient.lambda$new$8(AbstractWriteClient.java:174)
at io.reactivex.rxjava3.internal.subscribers.LambdaSubscriber.onNext(LambdaSubscriber.java:65)
at io.reactivex.rxjava3.internal.operators.flowable.FlowableDoFinally$DoFinallySubscriber.onNext(FlowableDoFinally.java:85)
at io.reactivex.rxjava3.internal.operators.mixed.FlowableConcatMapMaybe$ConcatMapMaybeSubscriber.drain(FlowableConcatMapMaybe.java:238)
at io.reactivex.rxjava3.internal.operators.mixed.ConcatMapXMainSubscriber.onNext(ConcatMapXMainSubscriber.java:106)
at com.influxdb.client.internal.flowable.BackpressureBatchesBufferStrategy$OnBackpressureBufferStrategySubscriber.drain(BackpressureBatchesBufferStrategy.java:238)
at com.influxdb.client.internal.flowable.BackpressureBatchesBufferStrategy$OnBackpressureBufferStrategySubscriber.onNext(BackpressureBatchesBufferStrategy.java:149)
at com.influxdb.client.internal.flowable.BackpressureBatchesBufferStrategy$OnBackpressureBufferStrategySubscriber.onNext(BackpressureBatchesBufferStrategy.java:54)
at io.reactivex.rxjava3.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.tryEmitScalar(FlowableFlatMap.java:232)
at io.reactivex.rxjava3.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.onNext(FlowableFlatMap.java:150)
at io.reactivex.rxjava3.internal.operators.flowable.FlowableFilter$FilterSubscriber.tryOnNext(FlowableFilter.java:75)
at io.reactivex.rxjava3.internal.operators.flowable.FlowableFilter$FilterSubscriber.onNext(FlowableFilter.java:53)
at io.reactivex.rxjava3.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.tryEmit(FlowableFlatMap.java:270)
at io.reactivex.rxjava3.internal.operators.flowable.FlowableFlatMap$InnerSubscriber.onNext(FlowableFlatMap.java:627)
at io.reactivex.rxjava3.internal.operators.flowable.FlowableMap$MapSubscriber.onNext(FlowableMap.java:69)
at io.reactivex.rxjava3.subscribers.SerializedSubscriber.onNext(SerializedSubscriber.java:103)
at com.influxdb.client.internal.flowable.FlowableBufferTimedFlushable$BufferExactBoundedSubscriber.accept(FlowableBufferTimedFlushable.java:227)
at com.influxdb.client.internal.flowable.FlowableBufferTimedFlushable$BufferExactBoundedSubscriber.accept(FlowableBufferTimedFlushable.java:85)
at io.reactivex.rxjava3.internal.subscribers.QueueDrainSubscriber.fastPathOrderedEmitMax(QueueDrainSubscriber.java:107)
at com.influxdb.client.internal.flowable.FlowableBufferTimedFlushable$BufferExactBoundedSubscriber.run(FlowableBufferTimedFlushable.java:281)
at io.reactivex.rxjava3.core.Scheduler$Worker$PeriodicTask.run(Scheduler.java:543)
at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:65)
at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:56)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the report with InfluxDB 2.7.1, influxdb-client-java 6.9.0, JDK 8, and a seven-day bucket retention policy. Compare the point timestamps with UTC and inspect the retention-policy error from the supplied Java setup. Done means identifying whether the timestamp or retention configuration causes the rejected points and documenting the confirmed correction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100