[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ISSUE: Checkgroups control messages
On 23 Sep 2008, at 16:20, Julien ÉLIE wrote:
Hi Thorfinn,
Looking at the current USEPRO text... *ponder* Serial number MUST
increase. That is definitely a problem - you certainly can run out
of 32 bit integer. It's not all that likely, but it's certainly
possible.
That is why I also suggested a mechanism (yet to be defined) to
*reset*
the counter. But the main problem is that it will cause problems to
a news server which does not receive the message of reset...
So it is maybe a bad idea.
Yep - reset doesn't work, for exactly that reason. We know that
relying on a single message to propagate for future correctness is
poor behaviour, especially since we know that message propagation
isn't even guaranteed to be in sequence, let alone delivered at all.
I'd be uncomfortable putting in a 32 bit limit unless we also
change the text to deal with serial comparison in the same way
that DNS serial numbers are compared.
From RFC 1035:
SERIAL The unsigned 32 bit version number of the original copy of
the zone. Zone transfers preserve this value. This value wraps and
should be compared using sequence space arithmetic.
I reckon it is the best solution to adopt.
Say that there is a 32 bit limit and that serial numbers SHOULD be
used
in case the checkgroups sender does not want to run out of available
numbers.
It is up to him if he does not want to use serial numbers.
DNS solves the problem by saying "sequence space arithmetic"...
meaning if you are within plus half-the-number-range, you can consider
the number "greater than", but if you are within minus half-the-number-
range, then you consider it less than.
e.g. for a sequence space of decimal 1000:
if your number is 250, then anything up to 750 is considered "greater
than", but from 751 - 249 is considered "less than". Or, if your
number is 999, then anything up to 499 is considered "greater than",
and 500-998 is considered "less than". (I might be off-by-one, but it
sort of doesn't matter - close enough is good enough for this purpose.)
So there's "effectively" a reset - because if you keep incrementing by
small amounts, you eventually come around to the other side of the
sequence space, and that "resets" it for you.
I note that a few DNS implementations do actually fail to implement
this correctly... but at least the standard says something useful, and
most DNS servers do implement handling of SERIAL changes correctly.
So I'd either go with:
1. the current text: "unsigned integer there is no limit" - in which
case implementers can actually trim leading zeros and do a straight
asciibetical comparison, no bigint library required.
2. unsigned 32 bit number, wrapping and compared using sequence space
arithmetic.
--
<a href="http://tertius.net.au/~thorfinn/">thorfinn@xxxxxxxxxxxxxx</a>
To err is human, to moo bovine. -- BSD fortune file