expire stale locks when owner is down (#11247)

fixes #11246
This commit is contained in:
Harshavardhana
2021-01-07 19:16:18 -08:00
committed by GitHub
parent b35b537e3f
commit a4f6705874
5 changed files with 21 additions and 4 deletions

View File

@@ -228,6 +228,11 @@ func (l *localLocker) Expired(ctx context.Context, args dsync.LockArgs) (expired
// Check whether uid is still active
for _, entry := range lri {
if entry.UID == args.UID && entry.Owner == args.Owner {
if ep, ok := globalRemoteEndpoints[args.Owner]; ok {
if err = isServerResolvable(ep); err != nil {
return true, nil
}
}
return false, nil
}
}