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] [CORE-6807] kafka: change offset_out_of_range condition in replicated_partition::prefix_truncate() #22944

Merged

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #22905

Previously, we would return an `error_code::offset_out_of_range` for
a request where `kafka_truncation_offset <= start_offset`.

This is different behavior from what most Kafka clients are expecting
when issuing `DeleteRecords` requests. Change the condition to return
early with a `error_code::none` result.

Also, correct conditions for tests that would previously expect a truncate
call with `offset <= start_offset` to fail with the new, expected behavior
(which is success).

(cherry picked from commit 06e7154)
Adds a wrapper function around `kafka-delete-records.sh` which can
be used to issue `DeleteRecords` requests.

(cherry picked from commit 4c85e83)
Uses `kafka-delete-records.sh` and `rpk trim-prefix` to assert that
Redpanda and Kafka achieve parity for certain edge cases involving
`DeleteRecords` requests.

Uses both `redpanda` and `KafkaService` brokers as mixins.

(cherry picked from commit a3f7130)
@vbotbuildovich vbotbuildovich added this to the v24.1.x-next milestone Aug 19, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Aug 19, 2024
@WillemKauf WillemKauf merged commit 4d3a861 into redpanda-data:v24.1.x Aug 19, 2024
19 checks passed
@piyushredpanda piyushredpanda modified the milestones: v24.1.x-next, v24.1.15 Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants