Only those with the most updated logs should be eligible to be leader. Add log comparison to ensure updated logs.
How to do this...
If C1 proposes and has more updated logs than Followers F1 and F2, but less so than F3, F1 and F2 check their logs and see that C1 is more recent - Yay! F3 checks its logs and see's its not updated. Do we have a source of truth? (We do in the server, but should we be using that or just comparing among followers?) Should there be a comparison before election starts?
Only those with the most updated logs should be eligible to be leader. Add log comparison to ensure updated logs.
How to do this...
If C1 proposes and has more updated logs than Followers F1 and F2, but less so than F3, F1 and F2 check their logs and see that C1 is more recent - Yay! F3 checks its logs and see's its not updated. Do we have a source of truth? (We do in the server, but should we be using that or just comparing among followers?) Should there be a comparison before election starts?