Skip to content

Use keyset pagination when fixing diff commits

Yorick Peterse requested to merge yorick/fix-missing-commits-pagination into master

What does this MR do and why?

The background migration FixMergeRequestDiffCommitUsers, originally added in !73307 (merged), didn't use keyset pagination for iterating over diff commits. In some cases this would lead to a SQL timeout, as a single query would try to fetch too many diff commit rows at once. This commit changes the code to use keyset pagination, allowing us to fetch the necessary data without any SQL timeouts.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading