mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 12:10:24 +03:00
lock: Timeout Unlock RPC call (#12213)
RPC unlock call needs to be timed out otherwise this can block indefinitely. Signed-off-by: Anis Elleuch <anis@min.io>
This commit is contained in:
@@ -54,12 +54,16 @@ type NetLocker interface {
|
||||
// Do read unlock for given LockArgs. It should return
|
||||
// * a boolean to indicate success/failure of the operation
|
||||
// * an error on failure of unlock request operation.
|
||||
RUnlock(args LockArgs) (bool, error)
|
||||
// Canceling the context will abort the remote call.
|
||||
// In that case, the resource may or may not be unlocked.
|
||||
RUnlock(ctx context.Context, args LockArgs) (bool, error)
|
||||
|
||||
// Do write unlock for given LockArgs. It should return
|
||||
// * a boolean to indicate success/failure of the operation
|
||||
// * an error on failure of unlock request operation.
|
||||
Unlock(args LockArgs) (bool, error)
|
||||
// Canceling the context will abort the remote call.
|
||||
// In that case, the resource may or may not be unlocked.
|
||||
Unlock(ctx context.Context, args LockArgs) (bool, error)
|
||||
|
||||
// Refresh the given lock to prevent it from becoming stale
|
||||
Refresh(ctx context.Context, args LockArgs) (bool, error)
|
||||
|
||||
Reference in New Issue
Block a user