On 2006-03-30T10:19:22, Andrew Beekhof <[EMAIL PROTECTED]> wrote:
> >Doesn't really work well if you have to assign more than one id per
> >second, does it? ;-) Also, epoch seconds is just as annoying to type.
> >I'd have suggested starting with id-1 and then going up from there -
> >always simply choosing the next free number.
> and figuring out what that last number was after a reboot?
> collisions from updates on other nodes?
Well, after a reboot, just run through them - the first time you assign
one, that might be a while (is_used(id)) {id++} which might run as far
as 20 iterations or so ;-) And then you're set again.
If id tags are not filled in, who does that? cibadmin, the library, the
local cib, or the DC-cib? If the CIB process on the DC does it
centrally, collisions "can't" occur.
I know we currently randomly assign one (and, them being UUIDs, 1:2^128
is a pretty low probability for collisions ;-).
But the GUI also assigns ids - not sure how several GUI clients prevent
clashes...
Sincerely,
Lars Marowsky-Brée
--
High Availability & Clustering
SUSE Labs, Research and Development
SUSE LINUX Products GmbH - A Novell Business -- Charles Darwin
"Ignorance more frequently begets confidence than does knowledge"
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/