alanlau28 opened a new pull request, #23086: URL: https://github.com/apache/kafka/pull/23086
Jira: https://issues.apache.org/jira/browse/KAFKA-20876 When restoring a windowed store with no checkpoint, `StoreChangelogReader` seeks to `latestTimestamp - retentionPeriod` rather than log-start, since data older than the retention is discarded on write. It learns `latestTimestamp` by seeking to `endOffset - 1` and polling once in `seekNewPartitions`; an empty poll falls back to `seekToBeginning`. The probe now starts at `endOffset - 32` and polls repeatedly at each position before stepping back, bounded by `PROBE_MAX_ATTEMPTS` and the log's beginning. It takes the newest record of the returned batch, so a deeper start costs nothing in accuracy — measured, the resolved record sat 2 offsets behind the end. `seekToBeginning` remains the behaviour when no data record can be found. -- 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]
