(blockID uuid.UUID, tenant, blockType string, fn reclaimFn)
| 38 | } |
| 39 | |
| 40 | func (q *quarantine) add(blockID uuid.UUID, tenant, blockType string, fn reclaimFn) { |
| 41 | q.mtx.Lock() |
| 42 | defer q.mtx.Unlock() |
| 43 | q.entries = append(q.entries, quarantineEntry{ |
| 44 | blockID: blockID, |
| 45 | tenant: tenant, |
| 46 | blockType: blockType, |
| 47 | deadline: time.Now().Add(q.grace), |
| 48 | reclaim: fn, |
| 49 | }) |
| 50 | } |
| 51 | |
| 52 | // reclaim runs fn for entries whose deadline has passed. Entries are dropped |
| 53 | // after attempt — a stuck deletion is not retried. |