Skip to content

Commit

Permalink
Make clearing of stale debug lock info independent of deleting map en…
Browse files Browse the repository at this point in the history
…try of lock itself. (minio#4353)

This is believed to address issue minio#4337 where stale information for debug locks in shown.
  • Loading branch information
fwessels authored and harshavardhana committed May 16, 2017
1 parent 5db1e9f commit cae4683
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions cmd/namespace-lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,12 @@ func (n *nsLockMap) ForceUnlock(volume, path string) {
if _, found := n.lockMap[param]; found {
// Remove lock from the map.
delete(n.lockMap, param)

// delete the lock state entry for given
// <volume, path> pair.
err := n.deleteLockInfoEntryForVolumePath(param)
if err != nil {
errorIf(err, "Failed to delete lock info entry")
}
}

// delete the lock state entry for given
// <volume, path> pair. Ignore error as there
// is no way to report it back
n.deleteLockInfoEntryForVolumePath(param)
}

// lockInstance - frontend/top-level interface for namespace locks.
Expand Down

0 comments on commit cae4683

Please sign in to comment.