Skip to Content.
Sympa Menu

devel - Re: [sympa-dev] list of lists page chapter n+1: write locks

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: David Verdin <address@concealed>
  • To: address@concealed
  • Subject: Re: [sympa-dev] list of lists page chapter n+1: write locks
  • Date: Thu, 06 Jan 2011 14:41:29 +0100

Hi András,

Le 06/01/11 10:47, András Bendzsák a écrit :
Could you point to which part of the code _read_ the PID from the lock
files (eg. stats.lock)?
Each time a daemon starts and it finds a pre-existing <daemon>.pid file. This is located in the tools::write_pid() function.
I didn't find any other occurrence of this operation. So I guess we could add an argument to the Lock::_lock_file() function specifying that the pid must be written and use it in tools::write_pid(). We could then get rid of most of the write operations when locking a file.
When the first time the cgi loads the lists it updates the admin_table,
the stats and maybe the binary configs. I don't know which part of these
are necessary.

The admin_table is in the database, so we don't need a filesystem lock.
The stats are useless for the list of lists.
However we read the config to know which visibility scenario will be used. I should check it but if the binary config are written only when the CGI loads ANd the config has changed, there should not be any writing when displaying the list of lists.

Improving the list of lists display performances is on my short term todo list, so I'll check why we use write locks for this operation.

Regards,

David



Archive powered by MHonArc 2.6.19+.

Top of Page