...
This page is meant as a template for writing a KIP. To create a KIP choose Tools->Copy on this page and modify with your content and replace the heading with the next KIP number and a description of your issue. Replace anything in italics with your own description.
Status
Current state: "Under DiscussionAccepted"
Discussion thread: here
JIRA: here
...
Code Block |
---|
--time <String: <timestamp> / -1 or timestamp timestamp of the offsets before that. -1 or latest / -2 or earliest / -3 or max- [Note: No offset is returned, if the timestamp / -42 or earliest-local / timestamp greater than recently -53 or latestmax-tieredtimestamp / committed record timestamp is -4 or earliest-local / given.] (default: latest) -5 or latest-tiered given.] (default: latest) |
In order to achieve this we will be adding new OffsetSpecs [1] - in particular entries for EarliestLocalSpec and LatestTieredSpec.
As part of this KIP we will change how the ListOffsets API behaves. We won't add any fields, but we will introduce a new behaviour on the broker when a timestamp with value of -5 is requested. Going forward, when provided with a timestamp of -5 a broker will return the latest tiered offset. We don't need to add -4 as it has already been added as part of previous KIPs.
The behaviour of asking for the earliest-local timestamp (-4) when Tiered Storage is not enabled is to return the earliest timestamp (-2). We need to define the behaviour of asking for the latest-tiered timestamp (-5) when Tiered Storage is not enabled. In such a situation, we won't return any offset. This behaviour is what we do already if someone asks for a timestamp greater than that of a recently committed record (and would thus ask for something outside the bounds of the log).
[1] https://kafka.apache.org/36/javadoc/org/apache/kafka/clients/admin/OffsetSpec.html
...