In this video, we demonstrate how Dgraph automatically syncs a restated alpha.
We begin by executing the following steps:
- Start zero with replica count set to 3
- Start 3 Alphas (alpha1, alpha2, alpha3). The third alpha is given a flag
--vmodule=server=3
, allowing for better query logging - The Dgraph increment tool is used to introduce a new predicate
counter.val
. This is an integer which is incremented. - We review the state of the cluster and predicates in Ratel. The three alphas belong to one group, implying that each Alpha is a replica of the data.
We do the following steps to demonstrate that a restarted alpha will receive snapshots
- Alpha3 is stopped
- The Dgraph increment tool is run several times to ensure that the
counter.val
drifts from the last value available with alpha3. - Start alpha3
- The Dgraph tool is again run, but this time directly against alpha3. It is noted that alpha3 has already received the snapshot and records the correct incremented value of
counter.val
- The logs from alpha3 show that it received an increment mutation