[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [leafnode-list] Local newsgroups possible with leafnode-2.0b7 ?
krasel@xxxxxxxxxxxxxxxxxxxxxxxxxxxx (Cornelius Krasel) writes:
>> Couldn't getxover() first compare the timestamps of the
>> overview file and the group directory?
> Is there any possibility that this may lead to locking problems?
I see no /additional/ locking problems. The current implementation
does not guarantee that the .overview file which remains on disk is
built from the most recent information, although this is very unlikely
to cause problems...
> Otherwise, it's certainly faster than to read through the whole
> directory, only to find that there are no new articles :-)
Unfortunately, the coarse timestamp resolution makes it impossible to
reliably determine which of two files has been written later.
How about the following approach:
If getxover() finds the mtime of the .overview file is not older than
the mtime of the group directory, it is considered up-to-date, and
just read in. Else, it is compared with the directory contents as
Because this isn't completely reliable, a program that has made
changes to the group has to call getxover() with a "force" flag to
suppress the timestamp comparation.
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list