Illustrate replication manager sequences in HA design doc
In order to better communicate the replication manager behavior, we should illustrate the various interactions between it and other relevant components (e.g. storage coordinator and transaction manager). A good illustration might be mermaid flowcharts showing various sequences from initiation outside the replication manager to completion. Some examples of relevant processes:
- How a replication manager consumes replication jobs from the datastore
- How a replication job is executed with respect to the backend nodes
- How a replication manager communicates to the storage coordinator that a node is now back in sync
For example, the replication manager sequence for executing a replication job might look like this:
graph TD
A[Replication job: Repo X on Replica Y is out of sync] --> B{Should X move to a new replica?}
B --> | Yes | C[Ask storage coordinator for replacement node]
B --> | No | D[Start replicating]