mirror of
https://github.com/pgsty/minio.git
synced 2026-07-23 14:10:25 +03:00
fix: a cosmetic error reporting with a lock timeout (#16788)
This commit is contained in:
@@ -170,7 +170,7 @@ func (di *distLockInstance) GetLock(ctx context.Context, timeout *dynamicTimeout
|
|||||||
RetryInterval: timeout.RetryInterval(),
|
RetryInterval: timeout.RetryInterval(),
|
||||||
}) {
|
}) {
|
||||||
timeout.LogFailure()
|
timeout.LogFailure()
|
||||||
cancel()
|
defer cancel()
|
||||||
if err := newCtx.Err(); err == context.Canceled {
|
if err := newCtx.Err(); err == context.Canceled {
|
||||||
return LockContext{ctx: ctx, cancel: func() {}}, err
|
return LockContext{ctx: ctx, cancel: func() {}}, err
|
||||||
}
|
}
|
||||||
@@ -199,7 +199,7 @@ func (di *distLockInstance) GetRLock(ctx context.Context, timeout *dynamicTimeou
|
|||||||
RetryInterval: timeout.RetryInterval(),
|
RetryInterval: timeout.RetryInterval(),
|
||||||
}) {
|
}) {
|
||||||
timeout.LogFailure()
|
timeout.LogFailure()
|
||||||
cancel()
|
defer cancel()
|
||||||
if err := newCtx.Err(); err == context.Canceled {
|
if err := newCtx.Err(); err == context.Canceled {
|
||||||
return LockContext{ctx: ctx, cancel: func() {}}, err
|
return LockContext{ctx: ctx, cancel: func() {}}, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user