Skip to content

Ignore empty MR diffs when migrating to external storage

What does this MR do?

If 1000 MR diffs exist without files, then the scheduler for migrating diffs to external storage will never complete, as these records are not excluded from the scheduler results, but are skipped when performing the migration (since there's no point generating an empty file in object storage)

This MR solves the issue by making the scheduler ignore MR diffs unless at least one merge_request_diff_files row exists for the merge_request_diffs row we're looking at.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Performance is the major question here. We maintain a partial index to help the scheduler. We may have to change the index to retain acceptable performance.

Related to #36646 (closed)

Edited by 🤖 GitLab Bot 🤖

Merge request reports