PrefixPoolLockKey returns the task-queue resource key that serialises all publish operations sharing the same pool directory under storagePrefix. It must be held whenever a non-MultiDist publish may read or clean the shared pool, to prevent concurrent cleanup runs from deleting each other's files.
(storagePrefix string)
| 618 | // shared pool, to prevent concurrent cleanup runs from deleting each other's |
| 619 | // files. See docs/Resource-Locking.md for the full key-namespace table. |
| 620 | func PrefixPoolLockKey(storagePrefix string) string { |
| 621 | return "P" + storagePrefix |
| 622 | } |
| 623 | |
| 624 | // RefKey is a unique id for package reference list |
| 625 | func (p *PublishedRepo) RefKey(component string) []byte { |
no outgoing calls
no test coverage detected