MCPcopy Create free account
hub / github.com/aptly-dev/aptly / PrefixPoolLockKey

Function PrefixPoolLockKey

deb/publish.go:620–622  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
620func PrefixPoolLockKey(storagePrefix string) string {
621 return "P" + storagePrefix
622}
623
624// RefKey is a unique id for package reference list
625func (p *PublishedRepo) RefKey(component string) []byte {

Callers 4

apiPublishRepoOrSnapshotFunction · 0.92
apiPublishUpdateSwitchFunction · 0.92
apiPublishDropFunction · 0.92
apiPublishUpdateFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected