MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / rollback

Method rollback

internal/lock/lock.go:291–296  ·  view source on GitHub ↗

rollback releases locks that were successfully acquired before a failure. Parameters: - ctx: The context for managing the unlock request lifecycle. - count: The number of locks to release (from the beginning of the slice).

(ctx context.Context, count int)

Source from the content-addressed store, hash-verified

289// - ctx: The context for managing the unlock request lifecycle.
290// - count: The number of locks to release (from the beginning of the slice).
291func (m *MultiLocker) rollback(ctx context.Context, count int) {
292 // Release in reverse order of acquisition
293 for i := count - 1; i >= 0; i-- {
294 _ = m.lockers[i].Unlock(ctx)
295 }
296}
297
298// Keys returns the deduplicated and sorted keys that this MultiLocker manages.
299func (m *MultiLocker) Keys() []string {

Callers 1

LockMethod · 0.95

Calls 1

UnlockMethod · 0.45

Tested by

no test coverage detected