Thread View: news.software.nntp
9 messages
9 total messages
Started by Tim Fardell
Fri, 08 Jun 2007 16:56
INN 2.4.3: overview rebuild left out some groups.
Author: Tim Fardell
Date: Fri, 08 Jun 2007 16:56
Date: Fri, 08 Jun 2007 16:56
35 lines
2302 bytes
2302 bytes
I recently had cause to rebuild the Overview database (don't ask!), and while the rebuild was largely successful, it seems to have skipped over some groups entirely, so they look to readers as though they are empty, when in fact there are messages in the spool. The ctlinnd renumber set the low watermark to the highest-numbered article in the spool +1 , so new posts are correctly being written into the spool, but all posts prior to the rebuild are invisible. The rebuild took almost 24 hours to complete, during which time the server was obviously down, so I am loathe to simply try another rebuild without understanding why it partially failed the first time. Running INN 2.4.3 with tradspool. Yes, I cleared out the entire /var/spool/news/overview directory before starting. The precise command I used was: makehistory -O -F followed by ctlinnd renumber "" I now know I should have used -e as well (to include Bytes), but I don't think this would cause it to skip some groups? Also, I ran makehistory as root instead of news - could this be the problem? Can anyone suggest what went wrong, and how I can fix the problem so the old posts become readable again? Many thanks in advance! -- Please remove all-your-clothes before replying.
Re: INN 2.4.3: overview rebuild left out some groups.
Author: Julien ÉLIE
Date: Fri, 08 Jun 2007 19:11
Date: Fri, 08 Jun 2007 19:11
17 lines
1850 bytes
1850 bytes
En réponse à Tim Fardell : > I recently had cause to rebuild the Overview database (don't ask!), > and while the rebuild was largely successful, it seems to have skipped > over some groups entirely, so they look to readers as though they are > empty, when in fact there are messages in the spool. Are these articles also absent from the overview .dat files? And from the history? (grephistory) No weird log in news.notice during makehistory? -- Julien ÉLIE « -- C'est un drôle de nom, HCL. -- C'est son immatriculation d'espion. Son vrai nom, c'est Acidcloridrix... » (Astérix)
Re: INN 2.4.3: overview rebuild left out some groups.
Author: Tim Fardell
Date: Fri, 08 Jun 2007 19:40
Date: Fri, 08 Jun 2007 19:40
20 lines
2027 bytes
2027 bytes
On Fri, 08 Jun 2007 21:11:38 +0200, Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> wrote: >En réponse à Tim Fardell : >> I recently had cause to rebuild the Overview database (don't ask!), >> and while the rebuild was largely successful, it seems to have skipped >> over some groups entirely, so they look to readers as though they are >> empty, when in fact there are messages in the spool. > >Are these articles also absent from the overview .dat files? >And from the history? (grephistory) They are absent from the overview .dat files, but they are present in the history file. >No weird log in news.notice during makehistory? Nothing in news.notice for the duration of the rebuild. -- Please remove all-your-clothes before replying.
Re: INN 2.4.3: overview rebuild left out some groups.
Author: Julien ÉLIE
Date: Fri, 08 Jun 2007 20:15
Date: Fri, 08 Jun 2007 20:15
16 lines
2002 bytes
2002 bytes
En réponse à Tim Fardell : > They are absent from the overview .dat files, but they are present in > the history file. Is it a tradindexed overview? You might then want to see tdx-util -R to rebuild the overview of a group. And tdx-util -F for everything. But it would be better to only rebuild the newsgroups which are empty (are there a lot of them?). You can do that while the server is running. -- Julien ÉLIE « Quand j'ai tort, j'ai mes raisons, que je ne donne pas. Ce serait reconnaître mes torts. » (Raymond Devos)
Re: INN 2.4.3: overview rebuild left out some groups.
Author: Tim Fardell
Date: Fri, 08 Jun 2007 21:00
Date: Fri, 08 Jun 2007 21:00
31 lines
2574 bytes
2574 bytes
On Fri, 08 Jun 2007 22:15:54 +0200, Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> wrote: >En réponse à Tim Fardell : >> They are absent from the overview .dat files, but they are present in >> the history file. > >Is it a tradindexed overview? >You might then want to see tdx-util -R to rebuild the overview of a group. >And tdx-util -F for everything. But it would be better to only rebuild >the newsgroups which are empty (are there a lot of them?). > >You can do that while the server is running. I did a tdx-util -A and it returned nothing, so presumably -F would do nothing? Should I throttle the server before doing tdx-util -R? Still doesn't explain why the rebuild went wrong in the first place, though! I only discovered the problem when users started saying "Hey, where have all the posts in newsgroup X gone?". The server only carries about 8000 groups, but it would take a while to check all of them, so I'm not sure which particular groups are affected. So far, I have found 2 completely empty groups and about 5 missing a chunk of their oldest posts - in all cases the "missing" articles are in the spool, but missing from overview. -- Please remove all-your-clothes before replying.
Re: INN 2.4.3: overview rebuild left out some groups.
Author: Julien ÉLIE
Date: Fri, 08 Jun 2007 21:23
Date: Fri, 08 Jun 2007 21:23
58 lines
3379 bytes
3379 bytes
En réponse à Tim Fardell :
> I did a tdx-util -A and it returned nothing, so presumably -F would do
> nothing?
You're right. If -A returns nothing, -F will do nothing.
> Should I throttle the server before doing tdx-util -R?
I think it is wiser to throttle it since Russ says in INN 2.x FAQ:
%%
Throttle the server (if it isn't already) and then run:
tdx-util -R <path-to-articles> -n <newsgroup>
%%
although the man page says it should be safe:
%%
The tradindexed overview method should lock properly and therefore it
should be safe to run this utility and perform any operation it performs,
including full repairs or per-group overview rebuilds, while the server is
running. However, note that some of the operations performed by this
utility can take an extended period of time and will hold locks in the
overview database during that period, which depending on what the server
is doing may cause the server to stall until /tdx-util/ completes its
operation.
%%
> Still doesn't explain why the rebuild went wrong in the first place,
> though!
I do not know what happened. Maybe other people here have an idea.
> I only discovered the problem when users started saying "Hey, where
> have all the posts in newsgroup X gone?". The server only carries
> about 8000 groups, but it would take a while to check all of them
Only those for which the highmark is an unity high than the lowmark?
> I'm not sure which particular groups are affected. So far, I have
> found 2 completely empty groups and about 5 missing a chunk of their
> oldest posts - in all cases the "missing" articles are in the spool,
> but missing from overview.
That is harder to find. Perhaps scanning the spool and looking for
articles whose number is not between the two marks.
But as you say, it will not explain why the rebuild went wrong...
--
Julien ÉLIE
« Mais écoutez ce qu'on vous dit, au lieu de taper comme un sourd ! » (Astérix)
Re: INN 2.4.3: overview rebuild left out some groups.
Author: Tim Fardell
Date: Mon, 11 Jun 2007 14:56
Date: Mon, 11 Jun 2007 14:56
39 lines
3190 bytes
3190 bytes
On Fri, 8 Jun 2007, [ISO-8859-15] Julien ÉLIE wrote: > > found 2 completely empty groups and about 5 missing a chunk of their > > oldest posts - in all cases the "missing" articles are in the spool, > > but missing from overview. > > That is harder to find. Perhaps scanning the spool and looking for > articles whose number is not between the two marks. > But as you say, it will not explain why the rebuild went wrong... Many thanks for your help, Julien! The server has about 60 or so local private groups, most of which have a 2-year expiry, so the majority of them have a low water mark of 1. I just looked for all the private groups with a low water mark greater than 1, and then checked the spool for those groups manually to see if the low water mark matched the lowest article number in the spool. This turned up a total of six groups with "missing" articles. I rebuilt the overview for those groups using tdx-util, renumbered the active file, and all the posts are now showing up correctly for those groups. For the public groups, these are all set to expire after just 31 days, so after a month of normal operation the problem will have gone away for those groups without any intervention, so I have decided to just ignore those. The only problem with this approach is that I will end up with bunches of orphan articles in the spool which will never get expired. Is there a quick way of tidying up these orphans? Still a bit of a mystery as to why the rebuild went wrong! Even though I have now recovered the situation, I would be very interested to understand what caused the problem in the first place. -- Please remove all-your-clothes before replying.
Re: INN 2.4.3: overview rebuild left out some groups.
Author: Julien ÉLIE
Date: Mon, 11 Jun 2007 15:54
Date: Mon, 11 Jun 2007 15:54
87 lines
4344 bytes
4344 bytes
En réponse à Tim Fardell :
> I rebuilt the overview for those groups using tdx-util, renumbered the
> active file, and all the posts are now showing up correctly for those
> groups.
That's great.
> For the public groups, these are all set to expire after just 31 days, so
> after a month of normal operation the problem will have gone away for
> those groups without any intervention, so I have decided to just ignore
> those.
All right. That is wise :)
> The only problem with this approach is that I will end up with bunches of
> orphan articles in the spool which will never get expired. Is there a
> quick way of tidying up these orphans?
Well, you just have to go through all your folders.
I use a script to delete the articles whose HIGHmark is too high
buy you can very easily adapt the last ligne [if ($_ > $hi)]
with [if ($_ < $lo)] for instance.
#!/usr/bin/perl
# Énumère les messages dont le higkmark est trop haut par rapport
# Ă l'active.
# Peut les supprimer automatiquement (en décommentant la ligne adéquate).
#
# Ce script est utile pour purifier le spool après une coupure de courant qui
# aurait corrompu l'active, ou après une erreur de suppression d'un groupe
# (une fois recréé, il repart de 1).
#
# Script trouvé sur Usenet.
# Amélioré par Julien Élie (03/06/06).
$rep = '/var/spool/news/articles';
$active = '/var/lib/news/active';
open (ACTIVE, $active) or die "Can't open $active: $!\n";
while (<ACTIVE>) {
my ($group, $hi, $lo, $flag) = split;
my $directory = $group;
next if ($hi == 0 and $lo <= 1);
$directory =~ tr%.%/%;
$directory = $rep . '/' . $directory;
if(-e $directory) {
opendir (DIR, $directory) or die "Can't open $directory: $!\n";
while (defined ($_ = readdir DIR)) {
#### Uncomment one [or both] of these two lines either to *do* or to *see*.
# unlink "$directory/$_" if ($_ > $hi);
# print STDERR "$directory/$_\n" if ($_ > $hi);
}
closedir DIR;
}
}
By the way, another solution is to do in your /var/spool/news/articles:
% find . -mtime +32 -type f -print > ~/old-articles
then wait (or use it in a screen). You will have all the articles
older than 32 days (so they should have expired).
See if everything is good in the file and just remove them:
% awk '{print "rm -f " $1}' ~/old-articles | sh
I do that sometimes (some articles are not removed by expire for a reason
I do not know and articles in removed newsgroups also need to be deleted).
> Still a bit of a mystery as to why the rebuild went wrong! Even though I
> have now recovered the situation, I would be very interested to understand
> what caused the problem in the first place.
I too...
--
Julien ÉLIE
« L'ordinateur obéit à vos ordres, pas à vos intentions. »
Re: INN 2.4.3: overview rebuild left out some groups.
Author: Russ Allbery
Date: Mon, 11 Jun 2007 16:28
Date: Mon, 11 Jun 2007 16:28
21 lines
2291 bytes
2291 bytes
Tim Fardell <tim.fardell.all-your-clothes@virgin.net> writes:
> Still a bit of a mystery as to why the rebuild went wrong! Even though I
> have now recovered the situation, I would be very interested to
> understand what caused the problem in the first place.
makehistory does something rather different than tdx-util because tdx-util
assumes a great deal more knowledge of the spool. In particular,
makehistory has a lot of complex code to try to deal properly with
cross-posted articles, and I think that it doesn't always work properly.
I've not been able to find a simple reproducible test case to track down
the problem, though.
For the combination of tradspool and tradindexed, makehistory should
probably do what tdx-util does.
--
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.
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