[go: up one dir, main page]

Draft: Reduce urgency for caching bots access levels

What does this MR do and why?

  • This MR sets a lower urgency for when a bot's project_authorizations needs to be deleted. Since, DestroyUserWorker already has a lower urgency, this should be fine.

Context

  • Project bots are created when a project access level token is created .
  • ResourceAccessTokens::InactiveTokensDeletionCronWorker cleans up these inactive project bots. To do this, it calls DestroyUserWorker. Both of these workers already have an urgency = low.
  • DestroyUserWorker -> calls ProjectRecalculatePerUserWorker if the bot is a ProjectMember, which finishes the job in time.
  • DestroyUserWorker -> calls AuthorizedProjectsWorker if the the bot is a GroupMember, so that the cache for all the projects in that namespace can be refreshed. This is where the jobs are consistently exceeding that target duration because often the number of records its deleting is > 10K.
  • Example correlation dashboard

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Hinam Mehra

Merge request reports

Loading