0
votes

running confluent-kafka 3.3.1e Kafka 0.11.0x

  • I have a single partition with replicas = 3.
  • My producer is running with ack=-1
  • The partition has 1 out of sync replica
  • Replica lag time max ms = 10000
  • Min insync replicas = 2

1) Will the record get committed from the producer when ack=-1

2) How can I get the out of sync replica back in sync?

1

1 Answers

1
votes

1) With acks=-1 Kafka will accept records as long as there are min.insync.replicas in-sync replicas.

So assuming min.insync.replicas is 1 or 2 for your topic, with a single replica out of sync, yes the record will be accepted by Kafka

2) In a normal case, Kafka always tries to keep all replicas in-sync. If that's not happening then you want to check the broker that is hosting the out-of-sync replica as something is wrong. Is this broker running? Is it healthy? Is it overloaded? Are other partitions on this broker also out-of-sync?

Older versions of Kafka also had some replication issues which could cause out of sync replicas. A good workaround these is to force a controller re-election:

zookeeper-shell [ZK_HOST:ZK_POST] rmr /controller