On 3/15/2011 12:14 PM, Edgecombe, Jason wrote: > I’m thinking of using a file lock (i.e. flock) in AFS to determine who > fetches the email, but I need to know about the failure scenarios. Does > the lock persist if the machine freezes or dies? Will an orphaned lock > expire, and if so, how long does it take to expire?
Locks in AFS are issued with a five minute lifetime and must be renewed by a client. Write-locks are exclusive to a single client. If the client dies or otherwise becomes disconnected from the file server that issued the lock, the lock will expire 5 minutes after it was issued. Read-locks are shared and can be issued to multiple clients. A read-lock is renewed whenever any client requests a renewal. If a client fails or becomes disconnected from the file server, its lock count will persist until five minutes after the last renewal request is issued. Obviously, the existence of an outstanding read-lock prevents the granting of a write-lock. Jeffrey Altman
signature.asc
Description: OpenPGP digital signature
