On Mar 30, 2006, at 10:37 AM, Lars Marowsky-Bree wrote:
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.
its doable but not terribly "nice".
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.
but not all updates "happen" on the DC remember
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...
IIRC usually it uses the resource id , the object type and a counter
in there
--
Andrew Beekhof
"I'd find myself if I knew where myself left me" - MGF
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/