🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #92751

Re: High and low water marks vs active file

#92751
From: InterLinked
Date: Mon, 04 May 2026 23:40
102 lines
6595 bytes
On 5/4/2026 7:00 PM, Julien ÉLIE wrote:
> Looking at the erratum:
> "The high water mark is one less than the low water mark for empty
> newsgroups. A major reason for doing it this way was to deal with
> clusters of servers. If they're not perfectly synchronized, then
> a cancel might be visible on one and not another. So if you connect
> to the second one, it looks as if the article has been reinstated.
> Wording it like this meant we didn't need special treatment of such
> clusters. The low water mark cannot decrease."
> 
> If a newsgroup has only article number 12, and this article is cancelled 
> in cluster A a few seconds before it is in cluster B, a newsreader 
> connecting to cluster A will see low water mark = 13, high water mark = 
> 12 (empty newsgroup with low = high + 1) and if it disconnects and 
> reconnects this time associated to cluster B before the cancel is 
> executed, it will see low water mark = high water mark = 12, thus having 
> decreased.
> When the high = low - 1 formula is used, it sees low water mark = 12 and 
> high water mark = 11 on cluster A.  The low water mark does not decrease.

But doesn't that still break if there are multiple cancels during that 
period? Say the group had articles 11 and 12, and both get cancelled. 
Now the low water mark is either 12 or 13, depending on the 
implementation. However, you connect to a server that hasn't processed 
either cancel yet, and now the low water mark is 11 again.

I think I understand the scenario, but it seems that doesn't entirely 
solve the problem either, just makes it less likely.

> Anyway, I agree that the problem is present in non-empty newsgroups if 
> the low water mark is updated on the fly.  If cluster A has article 13, 
> and cluster B has articles 12 and 13, the low water mark will be 
> inferior when connecting to cluster B...

Yes, I think that's sort of the same scenario I was thinking above. It 
doesn't even matter whether the group is empty. So the reason for 
rejection in the erratum doesn't even hold muster, as even the 
"official" way of doing it *can* theoretically break.

Initially I was doing LOW = LAST + 1 and then changed to LOW = LAST 
simply because INN had, but now that I understand this a bit better, I 
think I might change back to LOW = LAST + 1 and just handle 2^31-1 
specially to prevent an illegal response (and also use 0 0 0 for an 
empty group that never had any articles).

>> 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?
> 
> Yes, it is the third alternative allowed by RFC 3977, and I totally 
> agree it follows the same rule as a non-empty newsgroup.  Very liberal :)
> 
>     o  The high water mark is greater than or equal to the low water
>        mark.  The estimated article count might be zero or non-zero; if
>        it is non-zero, the same requirements apply as for a non-empty
>        group.
> 

Aside from 2^31-1, is there ever a case where one would use this?

I'm still having trouble seeing why case 3 is even necessary. Wouldn't 
this be a legal sequence, in a world where LOW = LAST + 1 (the way INN 
used to do it):

Article 2147483646 assigned, and then deleted:
LAST=2147483646
LOW=2147483647
HIGH=2147483646

Article 2147483647 assigned, and then deleted (so now group is full):
LAST=2147483647
LOW=2147483647 (floored at LAST, rather than LAST + 1, only in this case)
HIGH=2147483646

So the response in these two cases is actually identical; the client 
can't tell them apart. But the response is still legal, since the low 
water mark has not decreased, and HIGH is still LOW - 1. So if we can do 
this, why bother with case 3 and set both LOW and HIGH to 2147483647? 
Presumably something behaved this way historically, just can't fathom why...

There is obviously loss of information in that the client can't tell 
these two cases apart. However, in INN, a client also can't tell apart a 
group that has never had any articles, and a group that had one article 
which expired, since in both cases LOW=1 and HIGH=0, and that is legal 
as well.

So if I understand correctly, I believe this approach provides "maximal" 
information to a client, while remaining fully legal:
1) If a group has only ever been empty, respond LOW=HIGH=0 (case 2 in RFC)
2) If LAST < 2147483647, respond LOW=LAST+1 and HIGH=LOW-1 (case 1, the 
way INN used to)
3) If LAST = 2147483647, respond LOW=LAST and HIGH=LOW-1 (case 1, the 
way INN does now, and preferred by the RFC, though for somewhat 
unsatisfying reasons)

The benefit of adding step #2 is that in most cases, we can provide a 
more accurate low water mark - as you pointed out in the erratum.

Only in case 3 is the client unsure of a piece of information (whether 
LAST is 2147483646 or 2147483647), and this is arguably the least 
important case anyways.
Technical Details
Message-ID: <10tbaon$23gl$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> <10tb6lg$110d$1@dont-email.me> <10tb8f3$2bu8u$2@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 19:40:06 -0400
Organization: A noiseless patient Spider
Lines: 102
Message-ID: <10tbaon$23gl$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>
 <10tb6lg$110d$1@dont-email.me> <10tb8f3$2bu8u$2@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 23:40:08 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="69141"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19o6kCp4WlioKGp5pp4E81Fu811PhWfp34="; posting-host="439e29e093899f151e9588955bc9ff2e"
Cancel-Lock: sha1:MBlGWbyYrjCph/a77j0n4Bfk3ws= sha256:j0d9PILI23ypcaFOKZj4djHOhKCn7J7ryXaT21A/DPo=
	sha1:8avcx7HeQHzDZs0MqSZLVB4nUxI=
In-Reply-To: <10tb8f3$2bu8u$2@news.trigofacile.com>
X-Mailer: MailNews/52.9.9224a1
Content-Language: en-US