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)
| 289 | // - ctx: The context for managing the unlock request lifecycle. |
| 290 | // - count: The number of locks to release (from the beginning of the slice). |
| 291 | func (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. |
| 299 | func (m *MultiLocker) Keys() []string { |