You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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 Discussion"

Discussion thread: here

JIRA: here

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

Motivation

Describe the problems you are trying to solve.

KIP-405: Kafka Tiered Storage introduced the concept of a local log start offset. The local log start offset is the offset of a log above which reads are guaranteed to be served from the disk of the leader broker. In other words, this offset denotes the position after which data is still local. This offset was exposed as part of the ListOffsets API with designated integer -4.

There is a Kafka command line tool called kafka-get-offsets. It is not currently exposing -4 as a valid "reserved" integer with a special meaning i.e. getting the earliest local offset. The purpose of this KIP is to add this clarification to kafka-get-offsets.

Public Interfaces

Briefly list any new interfaces that will be introduced as part of this proposal or any existing interfaces that will be removed or changed. The purpose of this section is to concisely call out the public contract that will come along with this feature.

The current kafka-get-offsets --time flag has the following description:

--time <String: <timestamp> / -1 or        timestamp of the offsets before that. 
  latest / -2 or earliest / -3 or max-     [Note: No offset is returned, if the
  timestamp                               timestamp greater than recently     
                                           committed record timestamp is       
                                           given.] (default: latest)

After the change proposed in this KIP the description will be:

--time <String: <timestamp> / -1 or        timestamp of the offsets before that. 
  latest / -2 or earliest / -3 or max-     [Note: No offset is returned, if the
  timestamp / -4 or earliest-local         timestamp greater than recently     
                                           committed record timestamp is       
                                           given.] (default: latest)

Proposed Changes

Describe the new thing you want to do in appropriate detail. This may be fairly extensive and have large subsections of its own. Or it may be a few sentences. Use judgement based on the scope of the change.

As per the reference implementation (https://github.com/apache/kafka/pull/14788), we would need to add a new offset specification.

Compatibility, Deprecation, and Migration Plan

  • What impact (if any) will there be on existing users?
  • If we are changing behavior how will we phase out the older behavior?
  • If we need special migration tools, describe them here.
  • When will we remove the existing behavior?

The purpose of this change is to expose broker behaviour already changed as part of another KIP we do not foresee any changes to existing behaviour requiring phasing out or deprecation.

Test Plan

Describe in few sentences how the KIP will be tested. We are mostly interested in system tests (since unit-tests are specific to implementation details). How will we know that the implementation works as expected? How will we know nothing broke?

We will add unit and integration tests where appropriate to demonstrate that the correct offsets are being returned.

Rejected Alternatives

If there are alternative ways of accomplishing the same thing, what were they? The purpose of this section is to motivate why the design is the way it is and not some other way.

We rejected not exposing this offset. Even though we do not anticipate that customers will frequently ask for it, we believe that making it public will avoid confusion and will aid debugging should problems be encountered while operating Tiered Storage.

  • No labels