Skip to content

Support repository creation with repository specific primaries

Sami Hiltunen requested to merge smh-per-repo-create into master

Repository creation doesn't currently work when repository specific primaries are enabled. The PerRepositoryRouter's mutator routing requires a database record indicating the repository's primary in order to know where to route the mutator request. As the repository does not exist yet, it doesn't have a primary, causing the routing to fail.

This MR addresses the situation by handling repository creations separately from other mutators. The router picks a random healthy node to act as the primary and sets other nodes in the virtual storage as replication targets. The coordinator then stores the picked primary in the database.

Related to #3362 (closed)

Edited by Sami Hiltunen

Merge request reports

Loading