chamikaramj commented on code in PR #39600:
URL: https://github.com/apache/beam/pull/39600#discussion_r3722809726
##########
sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/cdc/WatchForSnapshotsSdf.java:
##########
@@ -231,35 +236,45 @@ public ProcessContinuation process(
if (!tracker.tryClaim(snap.getSequenceNumber())) {
return ProcessContinuation.stop();
}
- Instant ts = Instant.ofEpochMilli(snap.getTimestampMillis());
+ Instant commitTs = Instant.ofEpochMilli(snap.getTimestampMillis());
+ Instant ts = commitTs;
+ if (ts.isBefore(watermark.currentWatermark())) {
+ // The watermark already moved past this snapshot's commit time (e.g.
the idle bump ran
+ // ahead of a slow discovery). Use the current watermark so the
snapshot is not dropped
+ ts = watermark.currentWatermark();
Review Comment:
Probably there still a race (extremely rare) between we setting this here
and runner firing for the current watermark, right ?
##########
sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/IcebergCdcReadSchemaTransformProvider.java:
##########
@@ -211,12 +207,6 @@ static Builder builder() {
+ "MILLISECONDS, SECONDS, MINUTES, HOURS, DAYS. Defaults to
MICROSECONDS.")
abstract @Nullable String getWatermarkColumnTimeUnit();
- @SchemaFieldDescription(
- "Maximum expected snapshot discovery delay in seconds. While idle, the
source may advance "
Review Comment:
Did you intend to remove this knob ?
--
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]