Delete Untagged Artifacts Takes Excessively Long Time (4-8s per Artifact) During Garbage Collection #21443
Labels
area/gc
kind/question
more-info-needed
The issue author need to provide more details and context to the issue
needs/follow-up
Description
When running Harbor garbage collection (GC), the operation to delete untagged artifacts is extremely slow, taking 4-8 seconds per artifact. This causes GC tasks to run for hours when dealing with a large number of untagged artifacts。
Environment
Harbor Version: 2.6.2
Database: PostgreSQL 14
Root Cause Analysis
Based on code review and testing, the slowness likely stems from:
Artifacts are deleted one-by-one in a blocking manner.
Suggested Solutions
Delete artifacts in batches (e.g., 100 artifacts per transaction) to reduce database overhead?
The text was updated successfully, but these errors were encountered: