Article View: news.software.nntp
Article #78181Re: inn2_overview_fix (and expire question)
From: Matija Nalis
Date: Tue, 13 Nov 2007 16:01
Date: Tue, 13 Nov 2007 16:01
89 lines
5330 bytes
5330 bytes
On 2007-10-30, Russ Allbery <rra@stanford.edu> wrote:
> Matija Nalis <mnalis-news@voyager.hr> writes:
>> It is a perl script with just checks consistency using tradspool as
>> authorative information, and checking active(5) and tradindex files if
>> they match (and fixes them with "tdx-util -R" and "ctlinnd renumber" if
>> it doesn't)
>
> Okay. So the bits that are missing are checking the article numbers
> against the active file, running ctlinnd renumber, and checking the
> directory for (non-crossposted) articles that are missing from active.
Yes. Also missing in tdx-util (if I get it right) is checking the tradspool
articles against the overview itself.
> The Perl script is a good temporary solution, but I do think that in the
> long run tdx-util should be able to deal with all of that as well. I
That would be great, provided it doesn't silently die in the middle of
operation (as "makeactive -O" does, and as actually many C-programs are
known to do when they hit invalid pointer and stuff :()
> don't know if I'll get a chance to work on it any time soon, though. I do
> appreciate the additional ideas and code!
I've tried to mess with the C source, but found it too time consuming to
pick up quickly, so it was much easier for me to rewrite it from scratch in
perl :(
>> 3) it is one binary, and if it breaks, it could leave all other groups
>> unchecked (as I unfortunately found out with "makeactive -O" which
>> silently dies for me in inn2.4.3 without fixing majority of the groups).
>
> We should figure out what broke there.
I do have a backup server that has a copy of the innd software and the news
spool, so I think I can reproduce the problem. I do lack free time to hunt
it down all by myself, unfortunately.
So if you (or somebody else) can produce a patch that adds verbosity in all
places where makeactive (from inn 2.4.3) could die, I could try to make it
fail and report back where it dies, so the code could be fixed.
>> Which brings me to the another point - why didn't expire remove that
>> article from that directory when it expired overview for that directory?
>
> It's an annoying compromise that goes back to the history of how all this
> stuff originally worked.
Thanks Russ, the explanation below is useful.
I must say though I prefer the way stuff originally worked, it was much
less of the kludge (for tradspool) than it is now :(
> group. Therefore, each article stored in tradspool acquired a "primary
> group" and it's through that path that the article is retrieved when
> retrieving articles by token (which is done when retrieving articles by
<snip>
> This is ugly and kind of broken. I'm not sure of the best way to fix it.
> Another side database for tradspool that maps articles to newsgroups is
> probably the right way, although maintaining another database has various
> performance and complexity impacts that are annoying. I haven't given it
> a lot of thought; there's probably some elegant solution.
It does not seem to be very elegant ones... The best I can see is:
have /var/spool/news/master_articles which contains ALL [1] crossposted
articles (making this directory "primary group" for ANY crossposted
article), and then in each of crossposted groups you would hardlink there.
During expire, you would always only unlink the article from directory where
it expired (fast and simple). When the hardlink count reaches 1, it would
mean the article is no longer referenced from any groups, and you could do
final unlink (to free disk space) from news.daily via simple
"find /var/spool/news/master_articles -links 1 | xargs rm"
(or equivalent at the end of expire itself)
Code changes do seem relatively minor, but you do need another directory
hierarchy.
[1] for performance reasons, you would actually split
/var/spool/news/master_articles in 2-layer subdirectories named as hash
of article number and groups or something (like squid cache or other
stuff which stores huge number of files does) instead of keeping it flat
--
Opinions above are GNU-copylefted.
Technical Details
Message-ID:
<slrnfjjiip.q7j.mnalis-news@bukavac.carpriv.carnet.hr>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!feeder.news-service.com!tudelft.nl!txtfeed1.tudelft.nl!newsfeed.CARNet.hr!not-for-mailReferences:
<slrnfi1c8e.8k2.mnalis-news@bukavac.carpriv.carnet.hr> <873avtevy1.fsf@windlord.stanford.edu> <slrnfielr9.ioe.mnalis-news@bukavac.carpriv.carnet.hr> <87640oczr2.fsf@windlord.stanford.edu>Show Full Headers
Complete Article Headers
Message-ID: <slrnfjjiip.q7j.mnalis-news@bukavac.carpriv.carnet.hr> Subject: Re: inn2_overview_fix (and expire question) Date: Tue, 13 Nov 2007 16:01:11 +0000 From: Matija Nalis <mnalis-news@voyager.hr> References: <slrnfi1c8e.8k2.mnalis-news@bukavac.carpriv.carnet.hr> <873avtevy1.fsf@windlord.stanford.edu> <slrnfielr9.ioe.mnalis-news@bukavac.carpriv.carnet.hr> <87640oczr2.fsf@windlord.stanford.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!feeder.news-service.com!tudelft.nl!txtfeed1.tudelft.nl!newsfeed.CARNet.hr!not-for-mail Newsgroups: news.software.nntp Organization: CARNet, Croatia Lines: 89 NNTP-Posting-Host: 161.53.12.138 X-Trace: news1.carnet.hr 1194969671 2884 161.53.12.138 (13 Nov 2007 16:01:11 GMT) X-Complaints-To: abuse@CARNet.hr NNTP-Posting-Date: Tue, 13 Nov 2007 16:01:11 +0000 (UTC) User-Agent: slrn/0.9.8.1pl1 (Debian)