[go: up one dir, main page]

Skip to content

Improve pagination for note serialization during project export

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

This is a follow-on from #504039 (closed), a catch-all issue to fix instances of query timeouts during project import/export.

SELECT notes.id
FROM   notes
WHERE  notes.project_id = PROJECT_ID
       AND notes.noteable_type = 'Commit'
ORDER  BY notes.id ASC
LIMIT  100

This is triggered from the this line of code.

The catch is that the notes table is above the limit for the number of indexes, so we're discouraged (prohibited?) from adding more.

If possible, we'll need to update the pagination technique we use to better leverage existing indexes on this table.

Edited by 🤖 GitLab Bot 🤖