I have already found records that are only 28 milliseconds apart and the
server isnt really a big one. Its not so much the clock accuracy thats
important but the records must be processed in exactly the same order in which
they were written to disk. Thanks for the confirmation. It seems there is no
other way to do this.
Regards, Marco.
Wow - what kind of application needs
THAT kind of accuracy?!?...B  <old man
voice> Why I remember when two items
writing in the same SECOND was a feat!
</old man voice>

In this case, I don't
know how you escape having to do a "READVU" on the
item, and only writing on
the ELSE clause, and changing the key if a THEN or
LOCKED happens -- someone
else showed using a READV, but you really have to
do a READVU to ensure the
items are not hitting at EXACTLY the same time.

BASE.KEY = KEY
SEQCNT = 1
DO.WRITE = 0
LOOP UNTIL DO.WRITE
B  READVU TESTINGIT FROM FILENAME, KEY, 0
LOCKED
B  B  * No need to wait, Drop To Key Update
B  END THEN
B  B  * Need a
new key, Drop to Key Update
B  END ELSE
B  B  * Go!
B  B  EXIT
B  END
B  *
Once here, start adding sequence data...
B  KEY = BASE.KEY:"*":SEQCNT
B 
SEQCNT += 1
REPEAT
WRITE REC ON FILENAME, KEY

D3 has a 'System-Wide' Unique
ID generator in their SYSTEM() selectiosn...
U2 does not.B  Darn it.


>
-----Original Message-----
> From: [EMAIL PROTECTED] 
>
[mailto:[EMAIL PROTECTED] On Behalf Of 
> Marco Manyevere
>
Sent: Thursday, April 24, 2008 7:47 AM
> To: u2-users@listserver.u2ug.org
>
Subject: Re: [U2] Guaranteed unique sequential keys
> 
> David, Allen, Edward,
thanks for the suggestions but I want 
> to be able to sort theB records in
the exact physical order 
> in which they occured.B Using the port or pid
numbers could 
> potentially give me the wrong sequence should two events 
>
occur within the same millisecond (unless it is ruled out 
> that this is not
possible).
> Regards, Marco.
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit
http://listserver.u2ug.org/
___________________________________________________________ 
Yahoo! For Good.
Give and get cool things for free, reduce waste and help our planet. Plus find
hidden Yahoo! treasure 

http://green.yahoo.com/uk/earth-day/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to