Skip to content

repo-updater: Move orphaned repo to background job

Administrator requested to merge temp-filesize-error into main

Created by: ryanslade

Move the cleanup process into a background job instead of a trigger.

The trigger would run after any upsert to our external_service_repos table, even if no rows were actually deleted. This in turn would cause a temporary file size error causing both the cleanup code and original statement to be cancelled.

We could have modified the original statement to not even attempt a deletion if zero rows need to be deleted but this could cause us to run into the issue later when actually do need to delete some rows.

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

Merge request reports

Loading