Skip to content

Move routes tables back to gitlab_main

What does this MR do and why?

For #421597 (closed)

Ideally, we want the routes table to be a clusterwide table, because the proposed routing layer would depend upon this table being clusterwide, for cells to function properly - See #415201 (comment 1496933366)

But, that would only work if the column routes.namespace_id is unique - which can and will be unique once we implement Unique IDs across cells. But, for the time being, in GDK, we do not have this and hence the IDs are ambigous and conflicting across cells, since they are non-unique.

So, when the same ID of namespaces, which is present across cells, tries to create a 2nd record in the routes table, the UNIQUEness constraint on the column routes.namespace_id errors out like:

ActiveRecord::RecordNotUnique - PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "index_routes_on_namespace_id"
DETAIL:  Key (namespace_id)=(4) already exists.:

So, for the time being, we are moving routes tables back to gitlab_main schema. This will probably remain as such till we can come up with the solution for unique IDs across cells.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #421597 (closed)

Edited by Manoj M J

Merge request reports