Skip to content

Don't include unassigned nodes in transactions

Sami Hiltunen requested to merge smh-dont-route-to-unassigned-nodes into master

As part of the ongoing work to support variable replication factor in Praefect, Praefect gained support for assigning host nodes for repositories in 243dc385. Each repository has a number of nodes assigned to host it depending on their configured replication factor.

Praefect should not include unassigned storage nodes in transactions nor replicate any changes to them. This commit changes the PerRepositoryRouter to exclude unassigned nodes from routing decisions.

This commit only includes the routing logic and support for static assignments which can be used to fallback to the usual behavior of Praefect where repositories are hosted on every node.

The code will be hooked up in a follow up. Another follow up will implement an AssignmentGetter which fetches the assignments from the database.

Part of #3154 (closed)

Edited by Sami Hiltunen

Merge request reports