Mark an issue as dirty whenever a repository is changed
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem
It is very expensive to calculate used storage bytes for a zoekt issue due to many records and no upper limit to joined repositories. Right now, the best approach we have is to look at repositories that have a more recent indexed_at than an index updated_at.
Proposal
Whenever a repository indexing callback is fired, lets mark a zoekt index as dirty. That would allow us to filter down which indices need to have a used_storage_bytes calculation instead of doing all of them at once. Whenever an index has its used_storage_bytes recalculated, it should be marked as dirty: false.
References
Edited by 🤖 GitLab Bot 🤖