⚡ Remove per-target re-validation redundancy in BOS deletion execution #13

Merged
longtao.wu merged 1 commits from fix/project-deletion-redundant-bos-revalidation into dev 2026-09-23 02:26:14 +08:00

View File

@ -452,9 +452,14 @@ func (s *server) deleteProjectTarget(ctx context.Context, plan domain.ProjectDel
}
return nil
case "bos":
if err := s.validateDeletionReferences(ctx, plan); err != nil {
return err
}
// validateDeletionReferences is already re-run once by
// executeProjectDeletion immediately before it starts processing
// non-runtime targets (the runtimeDone gate) — that is the right
// point to catch a run created between plan-build and execution
// referencing this path. Re-running the whole org-wide validation
// again here, per bos target, made a project with a few thousand
// BOS targets take hours (each call re-fetches and re-scans every
// other run in the organization).
browser, conn, cleanup, err := s.resolveObjectStorageBrowser(ctx, t.ConnectionID)
if err != nil {
return err