πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #92750

Re: High and low water marks vs active file

#92750
From: InterLinked
Date: Mon, 04 May 2026 22:30
115 lines
6829 bytes
On 5/4/2026 4:52 PM, Julien Γ‰LIE wrote:
> Hi InterLinked,
> 
>>> high = low - 1 is what INN replies for empty newsgroups which 
>>> formerly received at least one article.

Just curious here - what's the rationale behind this, exactly?

Earlier Russ mentioned that *ideally*, you would want to provide as much 
information as possible. For a group with articles formerly, it seems 
that would be:

* Use the last article number for the low water mark
* Set high to low - 1

Since INN doesn't support reinstating articles, there is no downside to 
advertising that as the low water mark, as it would only increase from 
there. If I had to guess, is this because in INN, when a group is empty, 
the high water mark is not present in overview and it would have to 
check the active file, so 1/0 is used for efficiency?

(Or unless the last article number is the max allowed article number, 
even the old way of just doing high = last and low = high + 1 seems to 
be legal as well. Actually, that reminds me what it was about the 
erratum I didn't understand - a comment about server synchronization and 
how the low water mark a client reads might decrease in this scenario. 
Is anyone able to explain how that might happen?)

Also, this answers a previous question I had about seeing a bunch of 
groups with 1/0. Now I know that they indeed had articles at some point, 
because the response is 1/0, I have absolutely no information as to how 
many articles the groups have had before going inactive.

>> Isn't this also true for empty newsgroups which have never received an 
>> article either? low=1 and high=0
> 
> When the newsgroup has never received an article, I assume the concept 
> of "low water mark" does not exist as there hasn't been any first 
> article.Β  But yes, if you consider low=1 in that case, the formula is 
> the same.
> Maybe the ideal would be to advertise low=0 and high=0 in that case 
> (allowed by RFC 3977 to represent an empty newsgroup), which would 
> differentiate a newsgroup which has never received any article from 
> another one which has received only 1 article and is now empty.
> Well, nobody matters but it would make sense :)

Actually, it's a good idea. It provides a newsreader with "more" 
information than simply doing low=1/high=0 in both cases. Not that 
software would know the difference / treat the cases differently, but a 
human looking at group info would.

I did find it curious that in several places in INN, there are checks 
like this one:

if (!count) {
	if (!low) low++;
	high = low - 1;
}

I guess INN explicitly wants to make empty groups low=1/high=0 instead 
of low=0/high=0. I think it could just as well be:

if (!count && low) high = low - 1

It seems to me ideally, a response of 0/0 on an empty group with no 
articles, and low=last/high=low-1 would provide maximal information. In 
that situation, low=1/high=0 would only occur in a group that only ever 
had one article, which has since expired.

Not expecting INN to change, of course, but I think I might do it this 
way, as I would like to be as accurate as possible and provide as much 
"information" as possible in a response.

>> To confirm my own understanding, the only reason we do LOW = LAST 
>> (which is the same as LOW = HIGH in INN) and then HIGH = LOW + 1, 
>> rather than LOW = HIGH + 1, is to account for overflow when LAST/HIGH 
>> is the max article number?
> 
> I don't know whether that were the reason for the formula but yes, at 
> least it works with the max article number!
> 
> 
>> the LOW = HIGH + 1 method also has the advantage of being one higher 
>> than the other way, which you pointed out in the erratum. I kind of 
>> wonder if it would be valid to do it this way, except in the case that 
>> HIGH is the max article number
> 
> Yes, it is valid.Β  It respects the rule that "the high water mark will 
> be one less than the low water mark",

To clarify, I was talking about doing LOW = LAST + 1 normally, and LOW = 
LAST, just for 2^31-1 (HIGH = LOW - 1 in both cases).

The effect of this would be that it would be that the responses for an 
empty group where LAST = 2^31-1 and LAST = 2^31-2 would not be 
distinguishable. But again, the group is toast at that point so I'm not 
sure if it really matters. And it would provide the advantage of being 
able to have a low water mark that is one higher in all other cases, and 
thus provides more meaning.

> and when HIGH is the max article 
> number, you could use LOW = 2^31-1 and HIGH = LOW - 1 (the preferred way 
> per RFC 3977, as a SHOULD) or LOW = HIGH = 2^31-1 (an alternative way).

I'm a bit confused on this last point. It's valid to merely set 
low=high=2^31-1 to indicate a group is empty?

Is this by chance somehow the 3rd case in RFC 3977 6.1.1.2 for methods 
of representing an empty group? That last case never made any sense to 
me (high >= low and count can be anything), as that seems like it could 
easily happen in non-empty groups. Maybe if it required count be 0, that 
would be one thing, but I'm very puzzled by that qualifier - what cases 
(presumably) existed historically that resulted in a wording that an 
empty group could have a non-empty article count, and high >= low? I'm 
not really sure how I would tell if the group is empty or not.
Technical Details
Message-ID: <10tb6lg$110d$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!spool1.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <10t0m5h$1177o$1@dont-email.me> <877bpo570b.fsf@hope.eyrie.org> <10t12o5$14bjd$1@dont-email.me> <10t8fss$2a1vp$4@news.trigofacile.com> <10t8hh9$38008$1@dont-email.me> <10tb0v0$2bu8u$1@news.trigofacile.com>

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!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: InterLinked <nntp@phreaknet.org>
Newsgroups: news.software.nntp
Subject: Re: High and low water marks vs active file
Date: Mon, 4 May 2026 18:30:07 -0400
Organization: A noiseless patient Spider
Lines: 115
Message-ID: <10tb6lg$110d$1@dont-email.me>
References: <10t0m5h$1177o$1@dont-email.me> <877bpo570b.fsf@hope.eyrie.org>
 <10t12o5$14bjd$1@dont-email.me> <10t8fss$2a1vp$4@news.trigofacile.com>
 <10t8hh9$38008$1@dont-email.me> <10tb0v0$2bu8u$1@news.trigofacile.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 04 May 2026 22:30:09 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="33805"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18VRMIHj7lpVQE84TOpte+IyJzItDB6sSk="; posting-host="439e29e093899f151e9588955bc9ff2e"
Cancel-Lock: sha1:C3PkVnNSjymJ/TAINjpvPIZ2VOo= sha256:EMmBUtLXPf4O4xiphJQbtAL+gzp36MlnfrEpTZaQnco=
	sha1:drhCNs6ykxgm7llJbOQC6ZTN3ks=
X-Mailer: MailNews/52.9.9224a1
In-Reply-To: <10tb0v0$2bu8u$1@news.trigofacile.com>
Content-Language: en-US