Authors: Greg Harris, Ivan Yurchenko, Jorge Quilcate, Giuseppe Lillo, Anatolii Popov, Juha Mynttinen, Josep Prat, Filip Yonov
Current state: Discarded
Discussion thread: here [Change the link from the KIP proposal email archive to your own email thread]
JIRA: KAFKA-19161
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
This KIP was discarded due to a design change in KIP-1163 which made it unnecessary.
KIP-1150: Diskless Topics introduces the concepts of diskless topics, KIP-1163: Diskless Core describes in detail how data is written to and read from diskless topics. According to these KIPs, batches are forever attached to their original objects they were uploaded and committed in. This is problematic because of several reasons:
The desired characteristics listed in the Motivation sections are possible to achieve with object compaction. Compaction agents will run inside brokers (e.g. a dedicated thread). They ask for compaction jobs from the Batch Coordinator. Each job may be focused on one or multiple tasks:
The compaction agent will perform the operation in the streaming manner (i.e. using as little local memory buffer as possible). Ordering batches by offsets and grouping by topic-partition in input and output files will play a key role in this. During the job, one or multiple output files will be produced. After finishing the job, the compaction agent will commit the performed changes atomically to the Batch Coordinator.
When shared log segments are uploaded, they contain batches of multiple topic-partitions. There are two ways to proceed when we first merge them:
The former approach seems not viable because the number of (usually relatively expensive) PUT operations to the object storage will grow significantly. The latter approach thus seems better. However, there's a caveat with compacted topics. Batches in compacted topics tend to be relocated and rewritten much more often than in non-compacted topics and this would cause unnecessary disturbance to bigger files where batches from compacted topics happen to be stored. There may be compromise approaches / optimizations, for example:
It seems we’re at liberty to change the algorithm after the initial implementation as there’s no compatibility limitations.
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.
A public interface is any change to the following:
Binary log format
The network protocol and api behavior
Any class in the public packages under clientsConfiguration, especially client configuration
org/apache/kafka/common/serialization
org/apache/kafka/common
org/apache/kafka/common/errors
org/apache/kafka/clients/producer
org/apache/kafka/clients/consumer (eventually, once stable)
Monitoring
Command line tools and arguments
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?
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.