You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Francois Visconte (Jira)" <ji...@apache.org> on 2022/05/04 15:53:00 UTC

[jira] [Created] (KAFKA-13872) Partitions are truncated when leader is replaced

Francois Visconte created KAFKA-13872:
-----------------------------------------

             Summary: Partitions are truncated when leader is replaced
                 Key: KAFKA-13872
                 URL: https://issues.apache.org/jira/browse/KAFKA-13872
             Project: Kafka
          Issue Type: Bug
    Affects Versions: 2.7.2
            Reporter: Francois Visconte
         Attachments: extract-2022-05-04T15_50_34.110Z.csv

Sample setup:
 * a topic with one partition and RF=3
 * a producer using acks=1
 * min.insync.replicas to 1
 * 3 brokers 1,2,3
 * Preferred leader of the partition is brokerId 0

 

Steps to reproduce the issue
 * Producer keeps producing to the partition, leader is brokerId=0
 * At some point, replicas 1 and 2 are falling behind and removed from the ISR
 * The leader broker 0 has an hardware failure
 * Partition transition to offline
 * This leader is replaced with a new broker with an empty disk and the same broker id 0
 * Partition transition from offline to online with leader 0, ISR = 0
 * Followers see the leader offset is 0 and decide to truncate their partitions to 0, ISR=0,1,2

Attached some of the relevant logs. I can provide more logs if necessary



--
This message was sent by Atlassian Jira
(v8.20.7#820007)