Skip to content

Explicitly designate primary and replica nodes in praefect config

John Cai requested to merge jc-explicitly-designate-primary into master

fixes: #1927 (closed)

This MR modifies the praefect config to designate a primary node and replica nodes explicitly. It guarantees that the primary node is the one selected every time by adding it as id=0 in the in memory datastore, and when a primary is selected it selects id=0 every time.

With an explicit primary, we could potentially simplify the logic quite a bit and bypass the code that assigns a primary to a repository. However, since we already have the code there, I would rather exercise that code instead of simplifying things now and having to bring back the logic of assigning primaries to repositories later on.

Merge request reports