Malcolm Rowe wrote:
> On Tue, Sep 19, 2006 at 06:18:14PM +0530, Kamesh Jayachandran wrote:
>
>>> Hm. That's not ideal - get_index should be a read-only operation, but
>>> you can't prevent it from creating the database.
>>>
>> may be possible to check for the existence of file 'mergeinfo.db' as a
>> part of fs open hook like 'svn_fs_fs__open'.
>>
>
> And then do what, create it? If at all possible, we shouldn't create the
> mergeinfo database until we actually need to use it - for a parallel,
> see fs_fs.c:read_format(), where we deliberately don't create the FS
> format file if it doesn't exist.
>
> 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>
With regards
Kamesh Jayachandran
---------------------------------------------------------------------
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:06:28 2006