[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [leafnode-list] locking, again



Joerg Dietrich wrote:

> On Mon, Nov 20, 2000 at 10:40:30AM +0100, Cornelius Krasel wrote:
> > The groupinfo file contains numbers for the first and last article in
> > a newsgroup. These numbers are verified by texpire and fetchnews and
> > are needed by fetchnews and the nntpd. fetchnews needs to know the
> > last number of an article when it sorts new articles into the spool
> > to rise the article number properly. The nntpd needs to know the last
> > number to give proper replies to GROUP commands.
> > 
> > If the nntpd would not write the groupinfo file, it would still know
> > the last number because it stores it internally. 
> 
> What guarantees you that nobody starts a 2nd nntpd that reports
> wrong low/high marks?

Mmmm. I knew there was something which I had forgotten to think about ...
(Nitpick: the low water marks will always be correct. Only the high watermarks
 would be affected.)

[I can't really argue about NFS because I am only parrotting what other
 people say about it - I have no own experiences with it.]

> > 3) Locking would be again more "safe".
> 
> Locking is safe if you follow the simple guideline not to unlink
> anything that doen't belong to you.

As far as I can see, there is no process unlinking anything that doesn't
belong to it. (At least in theory; it will be true in practice as well
when writeactive() is moved into the main fetchnews process as suggested
by several people.) Several processes are unlinking lockfiles which do
not belong to anybody any more (because the process originally owning
the lockfile crashed). I believe this is a legitimate approach.

--Cornelius.

-- 
/* Cornelius Krasel, U Wuerzburg, Dept. of Pharmacology, Versbacher Str. 9 */
/* D-97078 Wuerzburg, Germany   email: krasel@xxxxxxxxxxxxxxxxxxxxxxxxxxxx */
/* "Science is the game we play with God to find out what His rules are."  */

-- 
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list