MarcoRob commented on PR #17473:
URL: https://github.com/apache/beam/pull/17473#issuecomment-1185778265
Hi @johnjcasey
I have been monitoring this flaky test which is throwing the following issue
`Caused by: java.lang.IllegalArgumentException: Trying to claim offset
1648580086959 before start of the range [1648580087254, 1648580087266)
at
org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument(Preconditions.java:440)
at
org.apache.beam.sdk.transforms.splittabledofn.OffsetRangeTracker.tryClaim(OffsetRangeTracker.java:97)
at
org.apache.beam.sdk.transforms.splittabledofn.OffsetRangeTracker.tryClaim(OffsetRangeTracker.java:38)
at
org.apache.beam.repackaged.direct_java.sdk.fn.splittabledofn.RestrictionTrackers$RestrictionTrackerObserver.tryClaim(RestrictionTrackers.java:59)
at
org.apache.beam.sdk.io.pulsar.ReadFromPulsarDoFn.processElement(ReadFromPulsarDoFn.java:170)`
The issue looks like is due when the
[processElement](https://github.com/apache/beam/blob/345452c6819e4c56891dd6145d751323ee4c89b2/sdks/java/io/pulsar/src/main/java/org/apache/beam/sdk/io/pulsar/ReadFromPulsarDoFn.java#L156)
search for the timestamp it fails because sometimes it set the cursor of the
offset to a previous position that has already been processed which produces
the above issue.
I set the following
[validation](https://github.com/apache/beam/blob/345452c6819e4c56891dd6145d751323ee4c89b2/sdks/java/io/pulsar/src/main/java/org/apache/beam/sdk/io/pulsar/ReadFromPulsarDoFn.java#L171)
when this issue happens and if it does resume again the process until it is
correct, let me know what do you think about it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]