MCPcopy Create free account
hub / github.com/docker/docker-agent / release

Method release

pkg/server/idempotency.go:55–68  ·  view source on GitHub ↗

release forgets key so a subsequent request with it is processed again. Used to roll back a reservation when the reserved operation fails, so a failure is retryable rather than being mistaken for a completed duplicate.

(key string)

Source from the content-addressed store, hash-verified

53// Used to roll back a reservation when the reserved operation fails, so a
54// failure is retryable rather than being mistaken for a completed duplicate.
55func (c *idempotencyCache) release(key string) {
56 c.mu.Lock()
57 defer c.mu.Unlock()
58 if _, ok := c.set[key]; !ok {
59 return
60 }
61 delete(c.set, key)
62 for i, k := range c.ring {
63 if k == key {
64 c.ring = append(c.ring[:i], c.ring[i+1:]...)
65 break
66 }
67 }
68}

Callers 2

FollowUpSessionMethod · 0.45

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by 1