MCPcopy
hub / github.com/seaweedfs/seaweedfs / Unlock

Method Unlock

weed/filer/posixlock/manager.go:154–163  ·  view source on GitHub ↗

Unlock releases lk's owner's locks within its namespace over lk's range.

(key string, lk Range)

Source from the content-addressed store, hash-verified

152
153// Unlock releases lk's owner's locks within its namespace over lk's range.
154func (m *Manager) Unlock(key string, lk Range) {
155 m.mu.Lock()
156 defer m.mu.Unlock()
157 s := m.byKey[key]
158 if s == nil {
159 return
160 }
161 s.Release(lk)
162 m.afterRelease(key, s, lk.Sid)
163}
164
165// GetLk reports the lock that would block proposed on key, if any.
166func (m *Manager) GetLk(key string, proposed Range) (Range, bool) {

Calls 3

afterReleaseMethod · 0.95
LockMethod · 0.45
ReleaseMethod · 0.45