Skip to Content.
Sympa Menu

devel - Re: [sympa-developpers] Lock problem?

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: Guillaume Rousse <address@concealed>
  • To: address@concealed
  • Subject: Re: [sympa-developpers] Lock problem?
  • Date: Tue, 23 Jul 2013 19:36:21 +0200

Le 23/07/2013 18:40, IKEDA Soji a écrit :
"Hardlink magic" (I named it) is, as I understood:
(1) There may be only one main lock file (i-node) by each target
file;
(2) Each proccess or routine creates a hardlink to the file above
so that add shared-lock to the target file, and unlink it to
unlock target file;
(3) When the main lock file does not have hardlinks anymore,
it is removed from filesystem by the kernel.

- Lock file will be removed by kernel automatically.
- As lock files may exist independent from target files, forward
locking is possible.
- As hardlink is usual thing on Unix-like systems, it may work
on environmets not limited to NFS.
Despite my initial understanding, the module name actually means 'NFS-compatible' locking, not 'NFS-based' locking.

It seems to be light and easily readable, so I'm OK for the change. And a full replacement for Sympa::Lock, instead of an underlying mechanism for this class. As they work the same way ((maintaining a 'foo.NFSlock' file whose existence is enough to advertise 'foo' is currently locked), so I don't see much point in encapsulating it in our custom API.

--
Guillaume Rousse
INRIA, Direction des systèmes d'information
Domaine de Voluceau
Rocquencourt - BP 105
78153 Le Chesnay
Tel: 01 39 63 58 31

Attachment: smime.p7s
Description: Signature cryptographique S/MIME




Archive powered by MHonArc 2.6.19+.

Top of Page