Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

min.insync.replicas - Check if taken into account after changing the value

SOLVED Go to solution

min.insync.replicas - Check if taken into account after changing the value

New Contributor

Hi,

 

I need to know if the "min.insync.replicas" configured with a new value (2) is taking effect on all of our Topics that was already created before the change of this value.

 

What I've already done:

- I noticed that when I execute the command:

kafka-topics --zookeeper ServerName:2181 --topic TOPICTEST --describe

 

I have this result:

Topic:TOPICTEST    PartitionCount:3        ReplicationFactor:3 Configs:retention.ms=172800000

 

==> I don't see the "min.insync.replicas=2" result

 

I see it only when I alter the topic this way:

kafka-topics --alter --zookeeper ServerName:2181 --topic TOPICTEST --config min.insync.replicas=2

 

Then the result is of the same --describe is:

Topic:TOPICTEST    PartitionCount:3        ReplicationFactor:3 Configs:retention.ms=172800000,min.insync.replicas=2

 

Which confirms that the min.insync.replicas value has been taken into account.

 

How can I check the new default value is applied as planned?

 

Thanks,

 

Jo

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: min.insync.replicas - Check if taken into account after changing the value

Master Collaborator
I think you can test it on the newly created topic, try to shut down the following replicas, so that only the leader will be the ISR and since you have a min.insync set to 2 it should refuse to accept write. Otherwise, without this option your leader can tolerate the failure of the followers and accept the writes to the topic
6 REPLIES 6

Re: min.insync.replicas - Check if taken into account after changing the value

Master Collaborator
I think by default this setting your configuration is not set by default. Therefore after the topic was created you dont see this property on the topic. After you explicitly set the property it is applied by the Kafka,.

If you want to set it service wide, check out the docs https://www.cloudera.com/documentation/kafka/latest/topics/kafka_ha.html
Highlighted

Re: min.insync.replicas - Check if taken into account after changing the value

New Contributor
Thanks @Tomas79,

When launching the command again (after having changed the default value from 1 to 2) and create a new topic "TOPICtest2" afterward, 

I still don't see the property in the result of the command:

kafka-topics --zookeeper ServerName:2181 --topic TOPICtest2 --describe

.

.

Result:

Topic:TOPICTEST    PartitionCount:3        ReplicationFactor:3 Configs:retention.ms=172800000

 

Does this mean that the value (min.insync.replicas=2) is not showed when the topic has the default value?

 

Re: min.insync.replicas - Check if taken into account after changing the value

Master Collaborator
Yes, it could be the case.

Re: min.insync.replicas - Check if taken into account after changing the value

New Contributor

@Tomas79 wrote:
Yes, it could be the case.

Thanks @Tomas79, I need to make sure because all teams in my compagny are pressuring me about this answer :) They need me to make sure the topics are with the min.insync.replicas=2

If you have a way to check that, it would be perfect.

Re: min.insync.replicas - Check if taken into account after changing the value

Master Collaborator
I think you can test it on the newly created topic, try to shut down the following replicas, so that only the leader will be the ISR and since you have a min.insync set to 2 it should refuse to accept write. Otherwise, without this option your leader can tolerate the failure of the followers and accept the writes to the topic

Re: min.insync.replicas - Check if taken into account after changing the value

New Contributor

Thanks a lot for your help and your time @Tomas79, I will try this solution.