Explain how distributed consensus algorithms like Raft or Paxos handle state replication during network partitions.