Repository navigation
Conversation
2a5a535 to
bb0f4fe
Compare
JingsongLi
left a comment
There was a problem hiding this comment.
The primary fix has end-to-end value. All 27 Core tag tests and four existing Flink 1.20.1 watermark tests passed locally. An additional Flink SQL case confirmed that the default writer rejects the invalid first watermark before publishing a snapshot and creates the expected tag on the next valid write. Two supported configurations still reproduce the poisoned watermark in Flink SQL.
9dc3f15 to
6cd7c55
Compare
6cd7c55 to
42eeb06
Compare
|
@JingsongLi CI is green and comments are addressed. Another look when you have a chance? Thanks! |
JingsongLi
left a comment
There was a problem hiding this comment.
The two previous cases pass on this revision. All 46 cases in TagAutoManagerTest and TagPeriodHandlerTest passed locally.
| tagPeriodHandler.timeToTag(firstTag); | ||
| if (!firstTag.equals(delayedTag)) { | ||
| tagPeriodHandler.timeToTag(delayedTag); | ||
| } |
There was a problem hiding this comment.
[P2] Validate the completion tag due after a restart. With UTC, tag.creation-period-duration=70 s, and tag.automatic-completion=true, I committed watermark 253402300830000 and got tag 999912312359. I then reopened the committer and committed 253402300880000. The watermark-derived boundary still falls in year 9999, so validation passes and snapshot 2 is published. Restoring progress from the minute-precision tag name makes +10000-01-01T00:00:10 the next tag, and that tag is due at snapshot 2. Maintenance throws a DateTimeException and remains stuck on that snapshot. Please validate the tag due under the restored completion progress before publishing the snapshot.
| if (latestSnapshot != null && !exceedsTagRange) { | ||
| if (creation == null) { | ||
| if (options.writeOnly()) { | ||
| // A dedicated creator can remember tags that have already expired. | ||
| return; |
There was a problem hiding this comment.
[P2] Validate the first usable watermark for write-only writers. With hourly UTC tags, a 15-minute creation delay, and write-only=true, I committed Long.MIN_VALUE and then 253402304700000 to a table with no tags. The delayed boundary is printable, so this branch accepts the write. The separate maintainer creates its first tag from the immediate boundary and throws a DateTimeException for year 10000. A later write with a valid 2024 watermark still inherits the larger value. This branch can also let an extreme negative watermark wrap into a bogus future tag. Please require evidence of existing tag progress before allowing this fallback. When that progress is unknown, validate the immediate first-tag boundary.
…ut-of-range tag years
9ceffaf to
5aeb6fa
Compare
Fixes #11301.
Purpose
With
tag.automatic-creation=watermark, a Flink batch write that supplies epoch microseconds toend-input.watermarkcan produce an hourly tag in year 56664. The snapshot is published before tag creation fails, and later writes inherit its watermark even when they supply valid epoch milliseconds.Changes
end-input.watermark.Tests
Core tests cover rejection before publication, recovery on the next valid write, and period alignment at extreme timestamps. Flink 1.20.3 batch SQL also verified that a rejected write preserves the snapshot and tags and that the next valid write can create its hourly tag.