On Sat, Sep 09, 2000 at 02:06:55PM -0700, Greg Stein wrote:
> On Sat, Sep 09, 2000 at 01:53:57PM -0700, Zack Weinberg wrote:
> > I got the impression that each transaction was handled by a separate
> > process. A counter wouldn't work unless it was stored on the
> > filesystem or in shared memory - either of which involves more system
> > calls to get at. And if gettimeofday(2) isn't dirt cheap, your OS has
> > serious problems.
> The counter doesn't have to be unique across all threads/processes. The
> format would still be PID.COUNTER. Therefore, it can reside in the PID's
> state and you're all set.
Hmmm, actually, he does have a point. pids get recycled. I'm ashamed
to say that I haven't paid enough attention to know what the scope of
these transaction IDs are: if they are long-lived, then you might have
to worry about pid reuse, and a time field may be necessary as well.
Jim will pick something good, I'm sure. :) This kind of thing has been
solved many times before; any good mail programs with Message-ID
generation should have examples.
Received on Sat Oct 21 14:36:08 2006