Skip to content

Remove web_hook_logs foreign key

Alex Kalderimis requested to merge 362149-webhook-logs-lfk into master

What does this MR do and why?

See #362149

This removes the foreign key on web_hook_logs.web_hook_id, to address performance issues.

We accept the referential inconsistency since the logs cannot be retrieved independently, and they will be dropped eventually since we do not retain web-hook logs indefinitely.

Validations

  • ~"group::integrations"

  • No way for user to access once parent is deleted. Please explain:

    Web hook logs are accessed exclusively through the web hooks to which they belong.
    They cannot be addressed independently, and no API returns a web hook log by ID
    or by project/group/etc.
    
    They are only written in Sidekiq, and never read.
  • Is this FK safe to be removed to avoid LOCKing problems? (Explanation: &7249 (comment 819662046)).

    Yes, in fact removing this FK would solve several performance issues.

MR acceptance checklist

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

Edited by Alex Kalderimis

Merge request reports