• Patrick Bajao's avatar
    Delete all label links asynchronously when issuable gets destroyed · aaa2a18a
    Patrick Bajao authored
    This is based on the solution we created in
    https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57830 to
    improve the performance of the `Issuable::DestroyService`.
    
    Previously, the associated `label_links` to an Issuable (can be a
    MergeRequest, Issue or Epic) gets destroyed when an issuable gets
    destroyed. If there are 100 label links, that means 100 delete
    SQL queries as well.
    
    With this fix, the deletion will be done in batches. It's being
    done in batches to avoid statement timeouts in case there are a
    lot of label links to be deleted.
    
    The worker will be performed asynchronously when the feature flag
    is enabled.
    
    Changelog: performance
    aaa2a18a
325689-delete-all-label-links-async.yml 125 Bytes