Avoid creating repository when calling Wiki#empty?
What does this MR do?
In this MR we modify the Wiki#empty?
method to avoid creating the wiki repository if it doesn't exist.
We have realized that there are methods querying wikis (like the SearchController#count
in https://sentry.gitlab.net/gitlab/gitlabcom/issues/2478544/) and one of the main things they do is to call Wiki.empty?
. This call will automatically trigger the creation of the repository, which is not really optimum because it can make the request last longer, and it can have unexpected results.
Does this MR meet the acceptance criteria?
Conformity
-
Code review guidelines -
Merge request performance guidelines -
Style guides -
Separation of EE specific content
Related to #321376 (closed)
Edited by Francisco Javier López (ex-Gitlab)