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

Re: [PATCH][merge-tracking]libsvn_fs_util

From: Malcolm Rowe <malcolm-svn-dev_at_farside.org.uk>
Date: 2006-09-19 15:32:50 CEST

On Tue, Sep 19, 2006 at 06:36:44PM +0530, Kamesh Jayachandran wrote:
> Malcolm Rowe wrote:
> >Out of interest, what happens if two threads try to create the mergeinfo
> >database at the same time?
> >
> >Regards,
> >Malcolm
> >
> >
> Not sure what will happen, This is what I see in sqlite docs at
> http://www.sqlite.org/capi3ref.html#sqlite3_open
> <snip>
> The returned sqlite3* can only be used in the same thread in which it
> was created. It is an error to call sqlite3_open
> <http://www.sqlite.org/capi3ref.html#sqlite3_open>() in one thread then
> pass the resulting database handle off to another thread to use. This
> restriction is due to goofy design decisions (bugs?) in the way some
> threading implementations interact with file locks.
> </snip>
>

That's about thread affinity, not opening a non-existent database from two
threads simultaneously. I guess it'll work, as long as your CREATE TABLE
statement includes an IF NOT EXISTS clause... Just checked, it doesn't,
but you don't have a problem anyway because you currently don't support
creation of the mergeinfo schema except at filesystem-creation time.
(You will, of course, need to fix that somehow :-))

Regards,
Malcolm

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Sep 19 15:33:12 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.