Article View: news.software.nntp
Article #88291Re: Wrong output for GROUP/LISTGROUP commands
From: Julien ÉLIE
Date: Mon, 30 Mar 2020 21:35
Date: Mon, 30 Mar 2020 21:35
76 lines
4390 bytes
4390 bytes
Hi Paolo,
>> This is a valid NNTP answer. The use case is article reinstatement. Had
>> the answer been "211 1 2 2 local.test2" or "211 0 3 2 local.test2",
>
> the second field of group output should represent the number of articles
> in the group. It should be "0" if no articles are available.
I understand your point.
The fact is that the first number is an *estimated* count. INN does not
track the exact count at every moment. Cancels notably are not taken
into account immediately in the count.
INN's strategy is the third one:
[RFC 3977]
If the group is empty, one of the following three situations will
occur. Clients MUST accept all three cases; servers MUST NOT
represent an empty group in any other way.
o The high water mark will be one less than the low water mark, and
the estimated article count will be zero. Servers SHOULD use this
method to show an empty group. This is the only time that the
high water mark can be less than the low water mark.
o All three numbers will be zero.
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.
Also in old RFC 977:
The successful selection response will return the article numbers of
the first and last articles in the group, and an estimate of the
number of articles on file in the group. It is not necessary that
the estimate be correct, although that is helpful; it must only be
equal to or larger than the actual number of articles on file. (Some
implementations will actually count the number of articles on file.
Others will just subtract first article number from last to get an
estimate.)
> if the output of GROUP reports a number of articles greater than zero
> when there are none, a script could expect to find some article in the
> group so it will try to find it.
I bet a script is not supposed to expect that behaviour ("Clients MUST
accept all three cases").
> From my point of view, it does not matter which values ​​the lowmark and
> the highmark assume, I am only interested in the number of messages in
> the group. Following the strategy used by INN, the only way to know how
> many messages there are in a group is to use the (X)OVER or LISTGROUP
> commands which produce a large amount of output data and are expensive
> for the server if the group has many articles.
> imho, if there are no articles in a group, that value must be zero. In any
> case, the value reported by GROUP should be equal to the number of lines
> of the LISTGROUP output after the banner and before the dot.
I perfectly understand you wish the "estimated count" were the "real
count". Nevertheless, that's not the case in NNTP. Some
implementations give the exact count, other don't. INN currently does
not. I don't know how other servers behave (but would happy to know if
other people have tested).
--
Julien ÉLIE
« Les trois journées de 1830 ont renversé 89. »
Technical Details
Message-ID:
<r5tomm$9sm$1@news.trigofacile.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mailReferences:
<r5se8o$ufl$1@gioia.aioe.org> <r5tbff$niq$1@news.trigofacile.com> <r5tkqe$633$4@gioia.aioe.org>Show Full Headers
Complete Article Headers
Message-ID: <r5tomm$9sm$1@news.trigofacile.com> Subject: Re: Wrong output for GROUP/LISTGROUP commands Date: Mon, 30 Mar 2020 23:35:18 +0200 From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> References: <r5se8o$ufl$1@gioia.aioe.org> <r5tbff$niq$1@news.trigofacile.com> <r5tkqe$633$4@gioia.aioe.org> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail Newsgroups: news.software.nntp Organization: TrigoFACILE -- http://www.trigofacile.com/ Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Mon, 30 Mar 2020 21:35:18 -0000 (UTC) Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="2a01cb0800a775006c30dd055deec4e4.ipv6.abo.wanadoo.fr:2a01:cb08:a7:7500:6c30:dd05:5dee:c4e4"; logging-data="10134"; mail-complaints-to="abuse@trigofacile.com" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 In-Reply-To: <r5tkqe$633$4@gioia.aioe.org> Content-Language: fr