Skip to content

Spark: Aligned compaction commit filtering between fillQueue methods#17176

Open
sandmannn wants to merge 1 commit into
apache:mainfrom
sandmannn:fix-compaction-streaming
Open

Spark: Aligned compaction commit filtering between fillQueue methods#17176
sandmannn wants to merge 1 commit into
apache:mainfrom
sandmannn:fix-compaction-streaming

Conversation

@sandmannn

Copy link
Copy Markdown

Addresses concern (3) from #17001

As called out in #17001. The async planner has differnet behavior in fillQueue(Snapshot readFrom) and fillQueue(fromOffset, toOffset) with regard to the start snapshot. Specifically, fillQueue(fromOffset, toOffset) includes the first snapshot even it is a replacement commit. This PR aligns the behavior to consistnetly drop the replacement commit by calling the same filtering logic that is already used in fillQueue(Snapshot readFrom).

Added test illustrates the change in the behavior for the async planner: wihtout the change in the fillQueue, the assertion will objserve the rows not only from the second batch, but also from the first batch added before the timestamp passed into the stream initialization.

As this change can be fairly isolated from other issues in #17001, creating a dedicated PR just for this one.

Follow ups

This change addresses the behavior in spark 3.5; can downport to spark 4.0 and 3.5 as a next change.

@github-actions github-actions Bot added the spark label Jul 12, 2026
@sandmannn sandmannn changed the title Aligned compaction commit filtering between fillQueue methods Spark: Aligned compaction commit filtering between fillQueue methods Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant