Article View: news.software.nntp
Article #92694Re: High and low water marks vs active file
From: Russ Allbery
Date: Fri, 01 May 2026 00:05
Date: Fri, 01 May 2026 00:05
97 lines
6021 bytes
6021 bytes
InterLinked <nntp@phreaknet.org> writes:
> However, the documentation for the active file in InterNetNews (INN)[2]
> says that <high> is the "highest article number that has ever been used in
> that newsgroup". This implies it is NOT the same as the reported high
> water mark, because the high water mark could decrease while <high> in
> this context is monotonically increasing
Correct, INN never decreases the high water mark under normal operations.
Therefore, if the latest article in the group is deleted, the high water
mark will not decrease and will reference a non-existent article.
This is how most news servers have historically behaved, so the arguable
implication in RFC 3977 that servers should decrease the high water mark
in this case is arguably a bug. In practice, it has no real effect since
news readers are required to handle this situation anyway, due to:
| The set of articles in a group may change after the GROUP command is
| carried out:
|
| o Articles may be removed from the group.
which is implicitly incorporated by reference into LIST ACTIVE since it
references that definition of high and low water marks (and logically has
to be the case regardless, since of course the state of the spool could
change after LIST ACTIVE just as it could after GROUP).
> - and the low and high water marks can be recomputed by scanning the
> spool directory, while <high> in the active file cannot (and thus needs
> to be stored persistently).
Yes, and I'm not sure INN's behavior when the news administrator
reconstructs the active file from the spool is strictly conforming in all
edge cases. (For example, the low water mark could decrease, which is
forbidden by RFC 3977.) In practice, the edge cases probably don't matter.
> I've been perusing the source of InterNetNews (INN) to try to understand
> how it behaves, as a reference. It refers to the active file <high> as
> LAST in a few places, and this is used when assigning new article IDs in a
> group. This makes sense. For LIST COUNT and GROUP, it pulls from group
> stats, which I believe is ultimately some kind of database backend that
> provides the reported water marks and article count. However, in the
> response for LIST ACTIVE, it simply dumps the line from the active file as
> is. Yet, the RFC says the response format for LIST ACTIVE includes the
> reported high and low water marks.
In theory INN could construct a LIST ACTIVE response from the overview
database. In practice, this is a very frequent operation and the current
implementation is probably considerably faster than an overview-based
implementation, for dubious benefit.
So, for your questions:
> 1. If "LAST" is an internal value used for assigning article IDs, and
> not the reported high water mark, then why is it being handed out as
> such for LIST ACTIVE? I would think it would use the actual reported
> high water mark, because if the high water mark article were deleted,
> then the response would have the wrong high water mark.
Because it's slow, basically. News readers like for LIST ACTIVE to be very
fast with a large number of groups so that they can show unread article
counts quickly on newsreader startup.
> 2. The same page says <low> in the active file is ~the low water mark
> but "not guaranteed to be accurate" and is just a hint. In INN, do the
> values of <low> in the active file ever differ from the low water mark
> in the group stats? Or are they distinct values like the active file
> <high> (LAST) and the low water mark?
I would never guarantee full integrity between all of INN's various
databases because they're all independent and updated non-transactionally,
so all sorts of weird things are true momentarily. In theory, the low
water mark in the active file should be eventually consistent with the low
water mark in overview, but it will certainly vary while in the middle of
nighly expire and may vary at other times that I'm not thinking of.
If I were writing a new news server from scratch today in 2026, I would
try very hard not to use INN's design of having four separate databases in
three entirely different formats for the active file, the newsgroup
descriptions, the overview, and the history. Surely there is some way to
write a transactional database that could track all those things in a more
reasonable but still performant way that doesn't require constantly
managing inconsistencies the way that INN does after some crashes or
corruption. It used to be that all SQL databases were just too slow,
particularly for history, but overview can be put in SQLite these days and
I'm dubious that there is no standard database that could handle history
given how much database optimization has happened over the years.
But INN will evolve slowly, if at all, because it basically works and a
lot of the bugs have been flushed out over the years and changing
architectures is very hard. :)
--
Russ Allbery (eagle@eyrie.org) <https://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<https://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID:
<877bpo570b.fsf@hope.eyrie.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!spool1.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nntp-feed.chiark.greenend.org.uk!ewrotcd!news.eyrie.org!.POSTED!not-for-mailReferences:
<10t0m5h$1177o$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!spool1.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nntp-feed.chiark.greenend.org.uk!ewrotcd!news.eyrie.org!.POSTED!not-for-mail From: Russ Allbery <eagle@eyrie.org> Newsgroups: news.software.nntp Subject: Re: High and low water marks vs active file Date: Thu, 30 Apr 2026 17:05:24 -0700 Organization: The Eyrie Message-ID: <877bpo570b.fsf@hope.eyrie.org> References: <10t0m5h$1177o$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain Injection-Info: hope.eyrie.org; logging-data="3386"; mail-complaints-to="news@eyrie.org" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:GJpFLSzCVNaOYd5us4WNFb+CU8U=