lizardfs
lizardfs copied to clipboard
Leader election
During a shadow promotion, we should check which shadow has updated metadata version, avoiding to promote an outdated shadow when a newer one is available. In example, if master node is at version 1001, shadow1 is at 999 and shadow2 is at 1001, we must promote shadow2 or data loss will occur.
This is true for promotion, but what about the first run, when all master are started as shadow waiting for a leader election ? Is it safe to promote the newer shadow that we have ?