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

Re: [leafnode-list] writeactive() not updating mtime?



Matthias Andree <ma@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> writes:

> fsync() is not useful in anyway for a news server (you might want to
> use it before acknowledging a POST).

I agree.

The behaviour Joerg described is caused by a locking problem:

The fetchnews child process doesn't inherit the lock from its parent,
but nevertheless updates the groupinfo. When leafnode read the
groupinfo stat(), it wasn't changed yet. No reason to reread it.

Later, fetchnews and leafnode concurrently wrote the groupinfo.

The lock should be handed over seamlessly from the fetchnews parent to
its child process.

There is another locking problem: When one process unlinks the
lockfile, another process may have it still open and later lock the
'zombie' file. This may also cause multiple processes to write to the
groupinfo simultaneously. Posting several articles in a short time
will result in that situation.

I think the .overview files may also be put under some locking policy.

Stefan


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