Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v24.1.x] Transforms: Fix deploy-time timequery bug #20139

Open
wants to merge 2 commits into
base: v24.1.x
Choose a base branch
from

Conversation

oleiman
Copy link
Member

@oleiman oleiman commented Jun 25, 2024

Backport of PR #20127

Default behavior is for transforms to start processing input from an offset
equivalent to "the latest committed offset at deploy time". However, in
situations where no records are committed between the moment the transform
was deployed and the moment the transform starts, the timequery servicing
this logic returns an empty result, which is handled by returning offset::min,
which signals the transform to begin processing at the beginning of the topic.

This commit adjusts the logic in source::offset_at_timestamp to return nullopt
for an empty timequery result, and the handling of that nullopt to resolve
the transform start offset to latest.

Signed-off-by: Oren Leiman <[email protected]>
(cherry picked from commit 2401fa3)
Specifically in situations where no records are produced between
deploy time and start time.

Signed-off-by: Oren Leiman <[email protected]>
(cherry picked from commit 0f49b21)
@oleiman oleiman added this to the v24.1.x-next milestone Jun 25, 2024
@oleiman oleiman added the kind/backport PRs targeting a stable branch label Jun 25, 2024
@github-actions github-actions bot added area/redpanda area/wasm WASM Data Transforms labels Jun 25, 2024
@oleiman oleiman self-assigned this Jun 25, 2024
@oleiman oleiman marked this pull request as ready for review June 25, 2024 17:40
@oleiman
Copy link
Member Author

oleiman commented Jun 25, 2024

/ci-repeat 1

@oleiman oleiman requested review from a team and pgellert and removed request for a team June 25, 2024 18:03
@oleiman
Copy link
Member Author

oleiman commented Jun 25, 2024

Conflict was some tests in data_transforms_test.py that only exist in dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda area/wasm WASM Data Transforms kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants