Skip to content

Add temporary index for locating orphaned notes

euko requested to merge sync-create-index-for-removing-orphaned-notes into master

What does this MR do and why?

We've discovered some notes records with NULL noteable_type !140488 (comment 1750493801). No such record should exist and there has been an application validation in place:

# https://gitlab.com/gitlab-org/gitlab/-/blob/27513d11416b387b632a34f6101494d07e527640/app/models/note.rb#L110
  validates :noteable_type, presence: true

An index to locate the invalid records was asynchronously created in !143918 (merged). This MR creates the same index synchronously.

Edited by euko

Merge request reports