🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #78142

Re: inn2_overview_fix (and expire question)

#78142
From: Russ Allbery
Date: Tue, 30 Oct 2007 16:51
81 lines
5258 bytes
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.

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
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'm not sure "tdx-utils -A" does all that checks -- it finishes way too
> quickly (about 2 minutes here for ~6 million articles in > 22k groups)
> and seems to miss some the stuff that looks wrong to me.

tdx-util -A only checks the overview for internal consistency.  I don't
think it also checks external data sources.  So you're right, you're doing
something different.

> I guess it just checks tradindex with active file or something like that
> (haven't had time to look into source) ? It does not seem to take
> tradspool storage as only authorative source of information (which it
> is, IMHO).

The only exception is that INN doesn't delete articles properly on ctlinnd
rmgroup, which needs to be fixed.

> And issue with just rebuilding all overview records (using "tdx-util -R"
> without group specification) was:

Oh, yeah, you don't want to do that.  In fact, I don't think tdx-util even
supports -R without -n (the man page claims it doesn't, anyway).

> 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.

> 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.

In the first version of INN, the history file stored a list of groups into
which each article was stored, since there was only one storage format.
When the article expired out of some groups, it was deleted out of those
groups and removed from the history line, remaining in the other groups.
(This gets more complex in the presence of symlinks, but I'll ignore that
for right now.)

When INN was changed to have a pluggable storage backend so that we could
support CNFS, the history file format changed to list a storage API token
instead of a list of groups.  Unfortunately, space in an API token is
limited and we can't store the complete list of groups, only encode one
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
message ID).  As a result, the article cannot be unlinked from the primary
group until the article has fully expired, even if it's already expired
from that specific group.  The primary group is just the first group
listed in Xref (in other words, the first group in Newsgroups that's
carried by the local server in the common case).

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.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID: <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!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!headwall.stanford.edu!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail
References: <slrnfi1c8e.8k2.mnalis-news@bukavac.carpriv.carnet.hr> <873avtevy1.fsf@windlord.stanford.edu> <slrnfielr9.ioe.mnalis-news@bukavac.carpriv.carnet.hr>

Show Full Headers
Complete Article Headers
Message-ID: <87640oczr2.fsf@windlord.stanford.edu>
Subject: Re: inn2_overview_fix (and expire question)
Date: Tue, 30 Oct 2007 09:51:13 -0700
From: Russ Allbery <rra@stanford.edu>
References: <slrnfi1c8e.8k2.mnalis-news@bukavac.carpriv.carnet.hr> <873avtevy1.fsf@windlord.stanford.edu> <slrnfielr9.ioe.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!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!headwall.stanford.edu!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail
Newsgroups: news.software.nntp
Organization: The Eyrie
Lines: 81
NNTP-Posting-Host: windlord.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: news.Stanford.EDU 1193763073 4722 171.64.19.147 (30 Oct 2007 16:51:13
 GMT)
X-Complaints-To: news@news.stanford.edu
User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)
Cancel-Lock: sha1:dYPLAOY9navGmA/4cyLxMHI9WY4=