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 08:34:25 +0100

Hi Andras and sorrysorrysorrysorrysorry for this late answer.
I had a lot of troubles lately and I'm afraid I neglected the Sympa lists too much.

Anyway, to answer your request, we need the pid number in some cases, such as when a process crashed and a new process starts and finds a pid file. This is how we are able to send the errors that made the process crash to the listmaster.
However:
- it is not necessary anytime, so we could tweak this.
- I don't see any reason why we sould put a write lock when displaying the list of lists. All we need to do, after all, is read data to know whether we can display a list or not. Nothing to write here. So there may be a bug.

Regards,

David

Le 19/12/10 17:24, Andras Bendzsak a écrit :
Hi All,

Many times has been discussed that the list if lists page load very
slow in large mailing list servers at the first time.

I found a small improvement in the locking system. The Locking system
write the process pid to the lock file when the lock type is write.
This doubles the necessary io operations. I had replaced the pid number
($$) with an empty string and the loading time has improved
significantly.

Is this pid number used by any part of sympa? If not I
recommend to remove this feature.

This is the relevant part of the Lock.pm:

## Keep track of the locking PID
if ($mode eq 'write') {
print $fh "$$\n";
}
}else {
&do_log('err', 'Failed locking %s: %s', $lock_file, $!);
return undef;
}




Archive powered by MHonArc 2.6.19+.

Top of Page