expire lockers if lockers are offline (#10749)

lockers currently might leave stale lockers,
in unknown ways waiting for downed lockers.

locker check interval is high enough to safely
cleanup stale locks.
This commit is contained in:
Harshavardhana
2020-10-24 13:23:16 -07:00
committed by GitHub
parent 6a8c62f9fd
commit d9db7f3308
9 changed files with 35 additions and 25 deletions

View File

@@ -241,6 +241,7 @@ func lock(ctx context.Context, ds *Dsync, locks *[]string, id, source string, is
UID: id,
Resources: lockNames,
Source: source,
Quorum: quorum,
}
var locked bool

View File

@@ -33,6 +33,9 @@ type LockArgs struct {
// Owner represents unique ID for this instance, an owner who originally requested
// the locked resource, useful primarily in figuring our stale locks.
Owner string
// Quorum represents the expected quorum for this lock type.
Quorum int
}
// NetLocker is dsync compatible locker interface.