On Tue, 11 Sep 2001, Greg Stein wrote:

> On Tue, Sep 11, 2001 at 12:06:13AM -0500, William A. Rowe, Jr. wrote:
> >...
> > > where the code uses a pid (getpid()) you need to use a concatenation of
> > > pid and thread id.
> > >
> > > otherwise you violate some of the uniqueness guarantees.
> > >
> > > i just didn't bother trying to figure out how to get a thread id in any
> > > sort of portable way and left that to folks who actually wanted the module
> > > on those platforms.
> > >
> > > (this is actually mentioned in the comments near the top of the file
> > > describing how it works and the assumptions made.)
> >
> > As I've read.  IIRC there are some other subtle issues with the size of the
> > unique key.  Be careful that we keep everyone in sync.

there shouldn't be any subtle issues with size of the key -- the format
was designed to make size differences unimportant.

> > Seems that we now have 64 bit cpu's with potentially 64 bit pids.  This adds
> > to the equation, it looks like we need to cut over to those extra four bytes
> > across all platforms.
>
> Oh, screw all that mess :-)  Just use a UUID for the unique id. It has lots
> of bits, and it is already unique (by definition and without work).

i'm not convinced the UUID implementation in 2.0 is unique, or is as
robust as the technique mod_unique_id uses ... i started digging into this
months ago and never quite finished.  hopefully i'll get back to it and
see if i'm right or wrong.

64-bit pids don't seem likely at all.

-dean

Reply via email to