kafka/config
Ben Stopford 0baea2ac13 KIP-101: Alter Replication Protocol to use Leader Epoch rather than High Watermark for Truncation
This PR replaces https://github.com/apache/kafka/pull/2743 (just raising from Confluent repo)

This PR describes the addition of Partition Level Leader Epochs to messages in Kafka as a mechanism for fixing some known issues in the replication protocol. Full details can be found here:

[KIP-101 Reference](https://cwiki.apache.org/confluence/display/KAFKA/KIP-101+-+Alter+Replication+Protocol+to+use+Leader+Epoch+rather+than+High+Watermark+for+Truncation)

*The key elements are*:
- Epochs are stamped on messages as they enter the leader.
- Epochs are tracked in both leader and follower in a new checkpoint file.
- A new API allows followers to retrieve the leader's latest offset for a particular epoch.
- The logic for truncating the log, when a replica becomes a follower, has been moved from Partition into the ReplicaFetcherThread
- When partitions are added to the ReplicaFetcherThread they are added in an initialising state. Initialising partitions request leader epochs and then truncate their logs appropriately.

This test provides a good overview of the workflow `EpochDrivenReplicationProtocolAcceptanceTest.shouldFollowLeaderEpochBasicWorkflow()`

The corrupted log use case is covered by the test
`EpochDrivenReplicationProtocolAcceptanceTest.offsetsShouldNotGoBackwards()`

Remaining work: There is a do list here: https://docs.google.com/document/d/1edmMo70MfHEZH9x38OQfTWsHr7UGTvg-NOxeFhOeRew/edit?usp=sharing

Author: Ben Stopford <benstopford@gmail.com>
Author: Jun Rao <junrao@gmail.com>

Reviewers: Ismael Juma <ismael@juma.me.uk>, Jun Rao <junrao@gmail.com>

Closes #2808 from benstopford/kip-101-v2
2017-04-06 14:51:09 -07:00
..
connect-console-sink.properties KAFKA-2379: Add basic documentation for Kafka Connect. 2015-11-09 16:29:30 -08:00
connect-console-source.properties KAFKA-2379: Add basic documentation for Kafka Connect. 2015-11-09 16:29:30 -08:00
connect-distributed.properties KAFKA-4276: Add REST configuration in connector properties 2017-03-05 10:21:04 -08:00
connect-file-sink.properties KAFKA-2422: Allow copycat connector plugins to be aliased to simpler names 2016-01-04 15:01:58 -05:00
connect-file-source.properties KAFKA-2422: Allow copycat connector plugins to be aliased to simpler names 2016-01-04 15:01:58 -05:00
connect-log4j.properties KAFKA-2774: Rename Copycat to Kafka Connect 2015-11-08 22:11:03 -08:00
connect-standalone.properties KAFKA-3582; Remove references to Copcyat from Kafka Connect property files 2016-04-18 18:49:17 -07:00
consumer.properties kafka-1531; zookeeper.connection.timeout.ms is set to 10000000 in configuration file in Kafka tarball; patched by Manikumar Reddy; reviewed by Jun Rao 2014-07-16 08:13:06 -07:00
log4j.properties KIP-101: Alter Replication Protocol to use Leader Epoch rather than High Watermark for Truncation 2017-04-06 14:51:09 -07:00
producer.properties MINOR: Update `config/producer.properties` to have new producer properties 2016-01-05 06:22:28 -08:00
server.properties KAFKA-3959: enforce offsets.topic.replication.factor upon __consumer_offsets auto topic creation (KIP-115) 2017-02-01 19:55:06 -08:00
tools-log4j.properties KAFKA-2633; Default logging from tools to Stderr 2015-10-12 10:00:05 -07:00
zookeeper.properties KAFKA-141 Check and make sure that the files that have been donated have been updated to reflect the new ASF copyright;patched by nehanarkhede; reviewd by jjkoshy 2011-10-07 19:51:28 +00:00