mxm commented on code in PR #18348:
URL: https://github.com/apache/iceberg/pull/18348#discussion_r4185150625
##########
spark/v4.2/spark/src/main/java/org/apache/iceberg/spark/source/StreamingInitialOffsetStore.java:
##########
@@ -50,16 +50,28 @@ class StreamingInitialOffsetStore {
StreamingOffset initialOffset() {
InputFile inputFile = io.newInputFile(initialOffsetLocation);
if (inputFile.exists()) {
- return readOffset(inputFile);
+ StreamingOffset offset = readOffset(inputFile);
+ if (!StreamingOffset.START_OFFSET.equals(offset)) {
+ return offset;
+ }
}
+ // START_OFFSET has no position yet, so it is derived again instead of
stored
StreamingOffset offset = offsetSupplier.get();
Review Comment:
Agreed. The PR doesn't touch the initial offset store anymore, so a stored
-1 is never replaced under a recorded batch. An old checkpoint with -1 under an
uncommitted batch still needs the original timestamp to replay it, same as
before.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]