Skip to Content.
Sympa Menu

devel - Re: [sympa-dev] Is a lock need for /stats ?

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: Olivier Salaün - CRU <address@concealed>
  • To: Kazuo Moriwaka <address@concealed>
  • Cc: address@concealed
  • Subject: Re: [sympa-dev] Is a lock need for /stats ?
  • Date: Mon, 20 Jun 2005 13:56:16 +0200

You're welcome to extend the existing locking system as long as you respect the following rules to preserve backward compatibility :
  1. The default behavior should be to use existing locking functions (because it's been ruuning quite well for a while), not LockFile::Simple (it is still is 0.2.5 version)
  2. You should add a new sympa.conf parameter ("lock_method" for instance) that would have the current method as a default and a "nfs" value that would trigger the use of LockFile::Simple
  3. Depending on the value of the new parameter, tools::lock() would include the LockFile::Simple module and use it. You should include it via the "include" directive, not "use" ; this way sympa processes will still run even if LockFile::Simple is not installed.
  4. You should add an entry to the check_perl_modules.pl for the new optional LockFile::Simple module

If you manage to add this feature, we'll be pleased to add it to the CVS tree.
Otherwise, you can still describe the need and what should be done in our bug/feature tracking system :
http://listes.cru.fr/mantis/

Thank you.

Kazuo Moriwaka wrote:
I read tools::lock() and tools::unlock(). 
They uses flock() function which doesn't support lock over NFS. 
I'm thinking about replacing flock() by LockFile::Simple (this module support locks for non-NFS and NFS by argument).

It maybe need to create a new configuration option (maybe 'lock = flock/nfs') to select the locking method to avoid performance problemsin non-NFS filesystems.

How about it?
  

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




Archive powered by MHonArc 2.6.19+.

Top of Page