Thread View: news.software.nntp
3 messages
3 total messages
Started by Rahul Dhesi
Thu, 29 Feb 1996 00:00
inn vs overchan race condition
Author: Rahul Dhesi
Date: Thu, 29 Feb 1996 00:00
Date: Thu, 29 Feb 1996 00:00
45 lines
2657 bytes
2657 bytes
I have noticed a slight race condition as described below. This is mentioned here because I don't recall this observation being made before or mentioned in the inn FAQ postings. 1. inn receives an article, installs it, updates max field in active file, and feeds article headers to overchan 2. user's News reader sees updated max field in active file but no matching entry in .overview file; assumes article has expired and marks it as read 3. overchan now appends line for said article to .overview file 4. the next time the same user reads the same newsgroup, he will not see said article, because it is marked read I have experienced this race condition when using nn (installed to read News directly from the spool, not via nntp). Four possible solutions: 1. Modify all News readers such that the last consecutive n missing articles in any newsgroup's numeric sequence will not be marked read, so they will be looked up again the next time around. 2. Or modify News readers so the last consecutive n missing articles in a newsgroup's numeric sequence will be remembered as 'not found' rather than 'read', until a second subsequent attempt still fails to find them, and then they will be moved into the 'read' category. 3. Or have News readers use .overview files as the authoritative list and ignore the min and max fields in the active file. When using an nntp client for News reading, one might have to make the nntp server ignore the active file too and refer solely to the .overview file to get the article number range. Just read the first and last lines. 4. Or have inn append article headers to .overview files directly, and then update the max field in the active file. I am not sure how this would impact performance -- some concurrency would be lost, but some system calls (inn writes to pipe, overchan reads from pipe) would be saved. Implementation of these is left as an exercise for the reader. :-) -- Rahul Dhesi <dhesi@rahul.net> "please ignore Dhesi" -- Mark Crispin <mrc@CAC.Washington.EDU>
Re: inn vs overchan race condition
Author: Dave Barr
Date: Thu, 29 Feb 1996 00:00
Date: Thu, 29 Feb 1996 00:00
12 lines
1020 bytes
1020 bytes
In article <4h3bqt$dm7@hustle.rahul.net>, Rahul Dhesi <dhesi@rahul.net> wrote: >I have experienced this race condition when using nn (installed to read >News directly from the spool, not via nntp). Yes, that would explain it. nnrpd fills in overview data for articles present but not in the .overview file. newsreaders would need to duplicate this in their overview code to be consistent if they are reading directly from the spool. --Dave
Re: inn vs overchan race condition
Author: Jerry Aguirre
Date: Fri, 01 Mar 1996 00:00
Date: Fri, 01 Mar 1996 00:00
52 lines
3015 bytes
3015 bytes
In article <4h3bqt$dm7@hustle.rahul.net> Rahul Dhesi <dhesi@rahul.net> writes: >I have experienced this race condition when using nn (installed to read >News directly from the spool, not via nntp). If it had been reading via NNTP then this would not have happened as nnrpd knows that the NOV files are a performance aid and not guaranteed to be complete. When nnrpd returns the data it omits NOV entries for which there is not article in the spool. When an NOV entry is missing but the article exists then nnrpd will extract the needed data from the article itself. >Four possible solutions: ... A news reader that is reading directly from the spool should not depend on NOV being 100% accurate. If an NOV entry is missing then it needs to check the spool to see if the article exists. It is wrong for a reader to decide an article doesn't exist just because there is no NOV entry. If the article does exist then ideally it would get the threading information directly from the article just as nnrpd does. I (and others) regularly see missing NOV entries. When expireover is running overchan can be locked out and get behind. When the backlog reaches a certain point innd gives up and writes it to a file. There is no proceedure for recovering the lost entries except to run expireover -a each night. There is no guarantee there will EVER be an NOV entry for an article. What should a news reader do in that case? >4. Or have inn append article headers to .overview files directly, and This would be bad for performance. If overchan has trouble keeping up then innd is also going to be slowed. Updating NOV entries, appending to an existing file, is not as bad as creating articles but it is still going to slow down INN. A less drastic measure would be to have innd wait for some kind of ACK from overchan so it knew the record was updated. At least it could still talk to other NNTP channels while this was happening. It could be updating its binary article counters but not update the disk copy of the active file until overchan acknowledged each NOV entry existed. But this kind of implies that NOV becomes an integral part of news. Currently NOV is not required to run INN or by most readers. Think of NOV as a performance enhancement add on kind of like a cache. Should an OS assume a file does not exist just because the information is not in the cache? Jerry
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads