🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #65348

Re: Questions about Article Numbers

#65348
From: Jeffrey M. Vinocur
Date: Sat, 17 May 2003 04:05
59 lines
3501 bytes
In article <3ec53f93.963923658@news.dsl.net>,
CHRIS MORSE <chris@invalid.com> wrote:
>
>I was going to ask pretty much the same question.
>It's quite obvious that article numbers DO get reset.
>I would say that they *have* to, as they probably won't
>go beyond 2^31 or 2^32.

The rollover is perhaps the least of your worries, actually.
Each group has its own counter, and the groups with the most
"traffic" tend to be binary groups where the number of articles
may be dwarfed by the size of each article...though the
pseudo-group control.cancel may get enough traffic to, I haven't
worked out the math.


>The question, I think, is how do servers implement this?
>and how can we detect and handle it best?  do we have
>to do a full rescan of the newsgroup or is there some way to compute
>new values for the article numbers we had before?  (Probably not.)
>
>In my own software, I check the high-water number and 
>if it's less than the last time I checked, I perform a full rescan of
>the newsgroup.

There are a number of interesting scenarios that come immediately
to mind:

- a group overflows and rolls over to zero (in this case, the
  danger is that something like "for(i = old; i < new; i++)" may
  incorrectly decide that there are no articles to display).

- the server, or one group in particular, is reset (in this case,
  the old articles are gone, and new articles will have arrived
  starting at 1)

- the server crashed and so article numbers jumped back to what
  they were at some previous time (at the time the server
  restarts, all the articles still around have the articles you
  expect, but then new ones start coming in and get assigned
  numbers that you already had associated with old articles --
  and the article number may catch up to where it was before you
  even notice there's a problem, meaning you'd miss some new
  articles)

As you can see, it's quite tricky to find any meaning in the
little bit of data you have to work with, since the mere fact the
article number has increased doesn't guarantee that everything is
fine.  The amount of effort you put into checking for these
things depends how important it is that you detect such cases.
(For example, you could always check the highest article you saw
is still what you expect -- but what if that article got canceled
in the interim?)


-- 
Jeffrey M. Vinocur
jeff@litech.org
Technical Details
Message-ID: <ba4cdj$vb8$3@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.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.ems.psu.edu!news.litech.org!not-for-mail
References: <1fuuz0y.163h6f012dlkvgN%gbeggs@Canada.com> <ylr873zpy8.fsf@windlord.stanford.edu> <b9pmug$jhp$2@puck.litech.org> <3ec53f93.963923658@news.dsl.net>

Show Full Headers
Complete Article Headers
Message-ID: <ba4cdj$vb8$3@puck.litech.org>
Subject: Re: Questions about Article Numbers
Date: Sat, 17 May 2003 04:05:07 +0000
From: jeff@litech.org (Jeffrey M. Vinocur)
References: <1fuuz0y.163h6f012dlkvgN%gbeggs@Canada.com> <ylr873zpy8.fsf@windlord.stanford.edu> <b9pmug$jhp$2@puck.litech.org> <3ec53f93.963923658@news.dsl.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.ems.psu.edu!news.litech.org!not-for-mail
Newsgroups: news.software.nntp
Organization: Litech Systems Design
Lines: 58
Sender: jeff@litech.org
NNTP-Posting-Host: puck.litech.org
X-Trace: puck.litech.org 1053144307 32104 66.218.0.75 (17 May 2003 04:05:07 GMT)
X-Complaints-To: usenet@litech.org
NNTP-Posting-Date: Sat, 17 May 2003 04:05:07 +0000 (UTC)
X-Newsreader: trn 4.0-test76 (Apr 2, 2001)
Originator: jeff@litech.org (Jeffrey M. Vinocur)