🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #72528

Re: active file and watermarks

#72528
From: Jeffrey M. Vinocur
Date: Sat, 29 Oct 2005 16:37
133 lines
6911 bytes
In article <1130448503.506266.271950@g49g2000cwa.googlegroups.com>,
jschick@aafp.org <jschick@aafp.org> wrote:
>
>I'm hoping somebody can give me some insight into how this file affects
>what clients see in their readers, how it ties in to the history /
>overview, and so on.

Sure.  I'm assuming you're using tradspool for article storage
and tradindexed for overview, please say so if not.

First off, the history file is not really relevant for the client
per se.  It is a mapping used by the server to look up
Message-IDs and determine where in the spool the article is
located.  (It also contains some other information, such as the
timestamp for when article arrived.)  So it is used by the server
when handling client requests for articles by Message-ID (which
is not the way that clients commonly request articles).  It is
also used by "expire" to check if articles still exist and how
old they are.

The active file and overview database, in combination, are what
clients use to get information to display to the user.

The active file is consulted first (either in bulk with the LIST
command, or indirectly with the GROUP command) to find out the
high and low watermarks for each group of interest.  The client
probably is keeping track of the article numbers it has
previously seen and presented to the user.  It can compare this
data to the watermarks and estimate how many articles are
"unread" or "new" for the user.  The client would assume that
articles below the low watermark are gone and would not pursue
them further.  This is enough information to present the user
with a list of newsgroups and an unread message count.

Then, when the user enters a group, the overview database for
that group is consulted to generate a list of messages.  The
client would only ask for overview information about the articles
it doesn't already know about (if it keeps track of such
information), or at most all of the articles between the
watermarks.  This provides the subject, author, date, etc, needed
to generate the article list.

In repairing, renumbering updates the active file to match the
overview database.  Running makehistory rebuilds the history from
the article spool, and if you use -O it rebuilds the overview
database from the article spool as well.


>I was posting a while back about my problems with messages in local
>groups disappearing, and updated to 2.4.2 in hopes of alleviating them.
>Unfortunately they're still around. What happens is after it's been
>running (say, a week) clients start to not see some of the original
>posts from the group, only new stuff.

I can't say I remember your previous problems, so forgive me if I
repeat myself.


>While playing with it today my normal steps to combat the problem
>(makehistory and then renumber) weren't making any difference. I then
>looked at the active file and found most of the low watermarks were set
>to the same value of the high watermarks, or one or two numbers back. I
>manually edited each entry to 0000000001 and then clients that
>re-subscribed were able to see all the posts again (albeit as new,
>unread posts).

Okay, this is strange.  I don't have any good explanation for how
this could happen, and it's going to be really hard to figure out
now that you've rebuilt everything.

Here's how I think about your problem...

If the articles were actually being expired, then you wouldn't be
able to rebuild and get them back.  So your problem stems from
somewhere in the active/history/overview system, as you
suggested.  Next time it happens, here's what I would do to
investigate.

1.  Locate (in the spool on disk) an article that's "missing" and
    make note of its Message-ID, what group it's in, and the
    article number in that group.

2.  Examine the active file for that group and see if the article
    number is between the watermarks.

3.  Look in the overview database for that group (the .DAT file
    in the appropriate subdirectory; they're organized in
    directories by the initials of the components of the group
    name, e.g. $pathoverview/n/s/n/news.software.nntp.DAT) to see
    if there's still a line for the article in question.

4.  Check if there's an entry for the article in the history
    file.  You can do this with the grephistory tool like this

    grephistory '<1130448503.506266.271950@g49g2000cwa.googlegroups.com>'

    include the angle brackets, and being sure to use single
    quotes because otherwise the shell will misinterpret the
    angle brackets and any $ characters.

5.  If grephistory gives you a storage token, try retrieving the
    article like this:

    sm @0503000002820000637A0000000000000000@


If you report back all of that information, we'll have a lot more
useful to contribute.  (Also, if you decide to start trying to
fix it, run through the above steps after each thing you rebuild,
to see what effect it has, and tell us that information too.)


>I am at a loss as to what was setting the low watermarks so high. As we
>never want any of our posts to expire, as far as I'm concerned they can
>stay fixed at the first entry for good. The only thing that crosses my
>mind is the cron job I set up for the news.daily routine. The entry I
>had in there was "0 22 * * * /usr/lib/news/bin/news.daily noexpire
>delayrm", but I removed it in hopes of keeping our problem from coming
>back.

FWIW, I wouldn't recommend removing the cronjob.  In fact, I
wouldn't even recommend using "noexpire" -- I would simply adjust
expire.ctl for the behavior you want and let INN run its usual
way.  (In fact, I wouldn't mind looking over your expire.ctl now,
just for kicks.)

But certainly that cronjob shouldn't be the -cause- of your
problems.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Technical Details
Message-ID: <dk08g5$p1j$4@puck.litech.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news4.google.com!news.glorb.com!news.litech.org!not-for-mail
References: <1130448503.506266.271950@g49g2000cwa.googlegroups.com>

Show Full Headers
Complete Article Headers
Message-ID: <dk08g5$p1j$4@puck.litech.org>
Subject: Re: active file and watermarks
Date: Sat, 29 Oct 2005 16:37:25 +0000
From: jeff@litech.org (Jeffrey M. Vinocur)
References: <1130448503.506266.271950@g49g2000cwa.googlegroups.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news4.google.com!news.glorb.com!news.litech.org!not-for-mail
Newsgroups: news.software.nntp
Organization: Litech Systems Design
Lines: 133
Sender: jeff@litech.org
NNTP-Posting-Host: puck.litech.org
X-Trace: puck.litech.org 1130603845 25651 66.218.0.75 (29 Oct 2005 16:37:25
 GMT)
X-Complaints-To: usenet@litech.org
NNTP-Posting-Date: Sat, 29 Oct 2005 16:37:25 +0000 (UTC)
X-Newsreader: trn 4.0-test76 (Apr 2, 2001)
Originator: jeff@litech.org (Jeffrey M. Vinocur)