← 输入框|github.com|刷新
Skip to content

[iceberg] Skip already queued rows on a follow-mode retry - #7869

Merged
swanandx merged 1 commit into
mainfrom
iceberg-follow-retry
Nov 6, 2026
Merged

swanandx merged 1 commit into
mainfrom
iceberg-follow-retry

Conversation

@swanandx

@swanandx swanandx commented Nov 6, 2026

Copy link
Copy Markdown
Member

Linked Issue

Follow-up to #7590.

In follow mode, a read that failed part way was retried from the start, so its rows were ingested twice. Now the retry skips the rows that earlier attempts already queued, for each data file.

before: attempt 1 queues rows 1-7, fails -> retry queues rows 1-8   (1-7 twice)
after:  attempt 1 queues rows 1-7, fails -> retry queues row 8 only

A restart from a checkpoint taken during a retry still reads the snapshot again (at-least-once), as the docs already say.

Describe Manual Test Plan

New test rest_follow_retry_does_not_repeat_rows: it breaks the last data file of a snapshot, waits for the read to fail, restores the file, and checks that each row is ingested once. It passed 5 of 5 runs. Without the skip, the test fails with rows ingested twice. The full Iceberg suite passes.

Checklist

  • Unit tests added/updated
  • Integration tests added/updated
  • Documentation updated
  • Changelog updated

Breaking Changes?

Mark if you think the answer is yes for any of these components:

Describe Incompatible Changes

None.

@mythical-fred-oss

Copy link
Copy Markdown
Contributor

LGTM.

What I ran

Check Result
cargo test --locked -p feldera-iceberg deletion_vector_tests (incl. new a_retry_skips_the_rows_already_queued) 14/14 pass
cargo check --locked -p dbsp_connectors --tests --features iceberg-tests-follow clean
pre-commit run --files <changed files> pass
rest_follow_retry_does_not_repeat_rows not run (needs REST catalog + S3)

I checked the per-file skip-by-count against the parallel reader (per-file order holds with num_parsers > 1), against selected positions (the filter runs before the skip, so counts stay consistent), and against the new job_queue.flush() on error (no buffer lands after Rollback). I found no correctness issues.

Coverage gap (medium): the integration test breaks a whole file, so on retry each queued file is skipped in full. Two cases only have unit coverage of skip_queued itself: a failure in the middle of a multi-batch file, and a retry of a deletes read (polarity=false, deletion vectors). If the fixture can produce a file that fails after its first row group, a mid-file variant would cover the partial-skip path end to end.

@bestouff bestouff left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some smallish changes, but otherwise LGTM

Comment thread crates/connectors/src/test/iceberg.rs Resolved
Comment thread crates/connectors/src/test/iceberg.rs Resolved
Comment thread crates/connectors/src/test/iceberg.rs Resolved
A follow-mode read that failed part way was retried from the start, so
its rows were ingested twice. A retry now skips, in each data file, the
rows that earlier attempts queued.

Signed-off-by: Swanand Mulay <73115739+swanandx@users.noreply.github.com>
@swanandx
swanandx force-pushed the iceberg-follow-retry branch from 458e7e9 to bebbf98 Compare November 6, 2026 12:31
@swanandx
swanandx added this pull request to the merge queue Nov 6, 2026
Merged via the queue into main with commit 59e64e8 Nov 6, 2026
1 check passed
@swanandx
swanandx deleted the iceberg-follow-retry branch November 6, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants