Skip to content

Eliminate statement timeouts when namespace is blank

Stan Hu requested to merge sh-fix-empty-namespace-git-access into master

When some Git clients attempt to fetch a project without a namespace (e.g. project.git instead of group/project.git), a database with large number of rows may encounter a statement timeout while attempting to look up an empty namespace (WHERE route.path IS NULL) in GitAccess#ensure_project_on_push!.

To avoid this, we now check that a valid namespace is available before attempting to do more validation.

Closes #199207 (closed)

Edited by Stan Hu

Merge request reports