[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:

> Stefan Wiens wrote:
>
>> krasel@xxxxxxxxxxxxxxxxxxxxxxxxxxxx (Cornelius Krasel) writes:
>> 
>> >         if ( !stat( ".", &st ) ) {
>> >             mtime_dir = st.st_mtime;
>> >             if ( !stat(".overview", &st) && (st.st_atime > mtime_dir) ) {
>> >                 return 1;
>> >             }
>> >         }
>> 
>> I'm afraid this will fail if the directory has changed in between and
>> another process has later read the updated .overview file.
>
> I don't understand - please explain again for dummies :-(

User A: GROUP foo.bar
        211 2 5 6 foo.bar group selected
        XOVER 6
        224 ...

(A new article is added to the group, and .overview updated.)

User B: GROUP foo.bar
        211 3 5 7 foo.bar group selected
        XOVER 7
        224 ...

Now atime of .overview is again newer than mtime of group directory.
Your above code will return 1, keeping outdated overview data.

User A: GROUP foo.bar
        211 3 5 7 foo.bar group selected
        XOVER 7
        420 No articles in specified range.


Maybe the high water marks could be additionally used to determine if
overview is still valid?

Stefan


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