[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: CVS update: subversion/subversion/include svn_fs.h

From: Jim Blandy <jimb_at_savonarola.red-bean.com>
Date: 2000-09-09 23:24:12 CEST

Zack Weinberg <zack@wolery.cumb.org> writes:
> On Sat, Sep 09, 2000 at 11:24:00AM -0500, Jim Blandy wrote:
> >
> > > > + Every transaction is assigned a name. You can open a transaction
> > > > + by name, and resume work on it, or find out the name of an existing
> > > > + transaction. You can also list all the transactions currently
> > > > + present in the database. */
> > >
> > > Can we get a clarification on the construction of that name? Specifically,
> > > what characters will be used in the name? [A-Za-z0-9] ?
> >
> > Sure, whatever you want.
> >
> > I was going to use PID.TIME, where PID and TIME are both strings of
> > ASCII digits, and check for clashes. 99% of the time it'd be faster
> > than a more centralized allocation algorithm. Would that be okay?
>
> If two different machines can be in the same database (NFS-mounted or
> whatever) at the same time, that's not unique enough. But you
> probably don't want to allow that anyway.

Berkeley DB is unable to promise its transaction semantics if the
database is accessed via NFS. I'm hoping to make svn_fs_open return
an error if the user tries this --- if I can find a way to reliably
detect an NFS mount. (I think if stat returns a negative device
number, that's usually sufficient, but I'm not sure how portable that
trick is.)

> Also, TIME probably needs to be more precise than seconds since epoch,
> because several transactions might arrive in one second. Adding the
> microsecond count from gettimeofday() should be good enough.

I'll try to do the right thing. If I do the wrong thing, please
submit a patch.
Received on Sat Oct 21 14:36:08 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.