Skip to content

database: Faster external service deletion

Administrator requested to merge core/faster-external-service-deletion into main

Created by: ryanslade

Instead of scanning the entire repo table looking for orphaned repos after an external service has been deleted, we instead only scan repos we know may have been affected.

We had to use a temporary table since if the deletion was done in a CTE it is not visible in subsequent statements.

We also remove the trigger after external service is deleted as we take care of it in code.

Closes: https://github.com/sourcegraph/sourcegraph/issues/19513

Merge request reports

Loading