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

Merged
merged 2 commits into from
Jul 11, 2024

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 <oren.leiman@redpanda.com>
(cherry picked from commit 2401fa3)
@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

Specifically in situations where no records are produced between
deploy time and start time.

Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
(cherry picked from commit 0f49b21)
@oleiman oleiman force-pushed the vbotbuildovich/backport-20127-v24.1.x-596 branch from f914301 to bda09b8 Compare July 3, 2024 21:01
@oleiman
Copy link
Member Author

oleiman commented Jul 3, 2024

force push for missing exception import that was added upstream to test an unrelated, unbackported feature.

@oleiman
Copy link
Member Author

oleiman commented Jul 4, 2024

CI Failure: rptest.tests.raft_availability_test.RaftAvailabilityTest.test_leadership_transfer - not related to this change

@oleiman oleiman merged commit a69d54b into v24.1.x Jul 11, 2024
18 checks passed
@oleiman oleiman deleted the vbotbuildovich/backport-20127-v24.1.x-596 branch July 11, 2024 01:36
@BenPope BenPope modified the milestones: v24.1.x-next, v24.1.10 Jul 19, 2024
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.

5 participants