Fine tune over limit email notification worker
What does this MR do and why?
Fine tune over limit email notification worker as current method times out for sql statements - see https://gitlab.com/gitlab-org/gitlab/-/issues/413547#note_1422454511
As per !118906 (comment 1420459287)
- Remove skip locked since we only use one worker with a 24hr buffer
- Use read replica for reads
- load the
namespace_details
in a separate query
Database
- select namespaces for the update - https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/19300/commands/63702 (~530ms)
- update those namespaces selected - (ids 102-202 as a simulation of the output from the select) - https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/19300/commands/63705 (~45ms)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #413547
Edited by Doug Stull