-
Notifications
You must be signed in to change notification settings - Fork 579
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
Align KIP-79; Redpanda shouldn't return negative value when retention expires #4308
Comments
tbh clear its not just for retention expired, if you set a search for a time where the partition doesnt have data after or at the timestamp it also incorrectly returns -1 and shouldn't it should return as null |
From KIP-79 "If no message has a timestamp that is greater than or equals to the target time, a null will be returned" |
Here's my findings so far: Kafka Protocol:
Starting
Current behavior of Redpanda:
|
ListOffest returns the earliest offset with timestamp greater or equal to the timestamp specifed. If no such an offset is found, ListOffset should return null. See KIP-79 Fixes: redpanda-data#4308
ListOffest returns the earliest offset with timestamp greater or equal to the timestamp specifed. If no such an offset is found, ListOffset should returns an empty response: offset(-1) with timestamp(-1) and error_code.none. See KIP-79 Fixes: redpanda-data#4308
ListOffest returns the earliest offset with timestamp greater or equal to the timestamp specifed. If no such an offset is found, ListOffset should returns an empty response: offset(-1) with timestamp(-1) and error_code.none. See KIP-79 Fixes: redpanda-data#4308 (cherry picked from commit 6e5ca96)
/backport v21.11.x |
Version & Environment
Redpanda version: v21.11.12 (also exists in the dev branch,
248e103
)What went wrong?
Current Redpanda doesn't support what KIP-79 has carried, especially
Once a record's retention gets expired,
offsetsForTimes
throwsjava.lang.IllegalArgumentException: Invalid negative timestamp
since Redpanda returns a negative value.What should have happened instead?
Redpanda should return non-negative value
How to reproduce the issue?
offsetsForTimes
Additional information
The text was updated successfully, but these errors were encountered: