Add ref_count management for deletions with atomic operations and error handling

- Add DELETE endpoints for tags, packages, and projects with proper ref_count
  decrements for all affected artifacts
- Implement atomic ref_count operations using SELECT FOR UPDATE row-level locking
  to prevent race conditions
- Add custom storage exceptions (HashComputationError, S3ExistenceCheckError,
  S3UploadError) with retry logic for S3 existence checks
- Handle race conditions in upload by locking artifact row before modification
- Add comprehensive logging for all ref_count changes and deduplication events
- Include ref_count in upload response schema
This commit is contained in:
Mondo Diaz
2026-01-05 10:04:59 -06:00
parent 66622caf5d
commit 865812af98
3 changed files with 1175 additions and 314 deletions

File diff suppressed because it is too large Load Diff