Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

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

avatar
Explorer

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

avatar
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
6 REPLIES 6

avatar
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

avatar
Explorer
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?

 

avatar
Yes, it could be the case.

avatar
Explorer

@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.

avatar
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
Explorer

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