Crash replicas and recover

About saving the logs on cmd How to Copy the Command Output to Windows Clipboard - Digital Inspiration

I believe you can do
dgraph zero --my=localhost:5080 --replicas 3 -w zeroCluster >C:\zeroCluster_output.txt

I’m not sure if Microsoft gives support for pipes (but try):

dgraph cmmand cmmand |& tee -a zeroCluster_output.txt

But you can use the “bash” from github install.

/removeNode?id=3&group=2 If a replica goes down and can’t be recovered, you can remove it and add a new node to the quorum. This endpoint can be used to remove a dead Zero or Dgraph server node. To remove dead Zero nodes, just pass group=0 and the id of the Zero node.

Take a read Get started with Dgraph

Generally, the servers are in leader or follower state. When the leader crashes or the communication breaks down, the followers will wait for election timeout before converting to candidates. The election timeout is randomized. This would allow one of them to declare candidacy before others. The candidate would vote for itself and wait for the majority of the cluster to vote for it as well. If a follower hears from a candidate with a higher term than the current (dead in this case) leader, it would vote for it. The candidate who gets majority votes wins the election and becomes the leader.

more: Get started with Dgraph

1 Like