When does the Leader Role transition happen for a Partition

Hey @Prasanna

I wrote once a script which gives you more details into this. Take a look at it here

If you run it, it shows you the partition distribution and gives you the answer you are looking for.

$ ./partitionDistribution.sh 
Expected to be called with three arguments, like:
'./partitionDistribution.sh {nodes} {partitionCount} {replicationFactor}
$ ./partitionDistribution.sh 5 2 2
Distribution:
P\N|	N 0|	N 1|	N 2|	N 3|	N 4
P 0|	L  |	F  |	-  |	-  |	-  
P 1|	-  |	L  |	F  |	-  |	-  

Partitions per Node:
N 0: 1
N 1: 2
N 2: 1
N 3: 0
N 4: 0

If you have only two partitions and replication factor two then two nodes have no partitions to work with, which means they will not start the partition service and in consequence becoming not healthy.

Hope that helps.

Greets
Chris

2 Likes