GET request to /group/project/merge_requests/1 writes to database
As seen in https://sentry.gitlap.com/gitlab/staginggitlabcom/issues/42648/
Most GET requests in Projects::MergeRequestsController
can write to the database. This is incompatible with Geo and causes exceptions when accessing MRs on a Geo secondary.
As with Banzai's use of database cache columns, we should ensure we can write the column before actually doing so. Although perhaps we can remove the handling entirely in this case? Here's the method causing problems:
# Make sure merge requests created before 8.0
# have head file in refs/merge-requests/
def ensure_ref_fetched
@merge_request.ensure_ref_fetched
end