Browse Source
fix: a cosmetic error reporting with a lock timeout (#16788)
pull/16790/head
RELEASE.2023-03-09T23-16-13Z
Anis Elleuch
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
cmd/namespace-lock.go
|
|
@ -170,7 +170,7 @@ func (di *distLockInstance) GetLock(ctx context.Context, timeout *dynamicTimeout |
|
|
|
RetryInterval: timeout.RetryInterval(), |
|
|
|
}) { |
|
|
|
timeout.LogFailure() |
|
|
|
cancel() |
|
|
|
defer cancel() |
|
|
|
if err := newCtx.Err(); err == context.Canceled { |
|
|
|
return LockContext{ctx: ctx, cancel: func() {}}, err |
|
|
|
} |
|
|
@ -199,7 +199,7 @@ func (di *distLockInstance) GetRLock(ctx context.Context, timeout *dynamicTimeou |
|
|
|
RetryInterval: timeout.RetryInterval(), |
|
|
|
}) { |
|
|
|
timeout.LogFailure() |
|
|
|
cancel() |
|
|
|
defer cancel() |
|
|
|
if err := newCtx.Err(); err == context.Canceled { |
|
|
|
return LockContext{ctx: ctx, cancel: func() {}}, err |
|
|
|
} |
|
|
|