Make clearing of stale debug lock info independent of deleting map entry of lock itself. (#4353)

This is believed to address issue #4337 where stale information for debug locks in shown.
master
Frank 8 years ago committed by Harshavardhana
parent 5db1e9f3dd
commit cae4683971
  1. 10
      cmd/namespace-lock.go

@ -240,14 +240,12 @@ func (n *nsLockMap) ForceUnlock(volume, path string) {
if _, found := n.lockMap[param]; found { if _, found := n.lockMap[param]; found {
// Remove lock from the map. // Remove lock from the map.
delete(n.lockMap, param) delete(n.lockMap, param)
}
// delete the lock state entry for given // delete the lock state entry for given
// <volume, path> pair. // <volume, path> pair. Ignore error as there
err := n.deleteLockInfoEntryForVolumePath(param) // is no way to report it back
if err != nil { n.deleteLockInfoEntryForVolumePath(param)
errorIf(err, "Failed to delete lock info entry")
}
}
} }
// lockInstance - frontend/top-level interface for namespace locks. // lockInstance - frontend/top-level interface for namespace locks.

Loading…
Cancel
Save