#replication
Posts
-
Digging into Kafka's Source 9: Replication — The ISR, the High Watermark and the Wait Behind acks=all
A follower broker's ReplicaFetcherThread sends Fetch requests to the leader and copies its log, and the leader learns each follower's position from the offset in those Fetch requests and raises the high watermark. We follow, in Partition.scala and AbstractFetcherThread.scala, the rule for dropping out of the ISR (replica.lag.time.max.ms and lastCaughtUpTimeMs), the AlterPartition request that tells the controller about ISR changes, the condition an acks=all request waits for as a DelayedProduce in the purgatory, the places where min.insync.replicas rejects a request, and how a follower truncates a diverged log with leader epochs after the leader changes — and we check it all with examples that freeze and kill brokers in a three-broker cluster.