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

Re: Multiple Concurrent Connections?

From: Tim Coulter <tim_at_timothyjcoulter.com>
Date: 2007-07-19 08:32:22 CEST

On Wed, 2007-07-18 at 23:03 -0700, Blair Zajac wrote:
> Tim Coulter wrote:
> > All,
> >
> > Is Subversion supposed to handle multiple concurrent connections using
> > the Ruby bindings through the FS module, or am I supposed to limit it to
> > one connection at a time (say, using threads and synchronizing)?
> >
> > I'm connecting to Subversion straight from the filesystem API, and I'm
> > not going through a client context. I seem to get random errors which
> > suggest that the ladder is true.
> >
> > Thanks for your help,
> > Tim Coulter
>
> Did you see this in svn_fs.h?

No I didn't, but that explains things a bit. I am using Svn::Repos.open
(the Ruby binding equivalent to svn_repos_open()) to access the
repository, but I can't seem to perform filesystem functions (like
writing data during a commit) using simply Svn::Repos itself. As far as
I know, I have to delve into the Svn::Fs::Root.apply_text function
during a transaction in order to make any changes -- this is where the
segmentation faults (some of my random errors) seem to occur.

Is your Subversion server open source, so that I may look at the code
and try to compare the two implementations? At the heart of it, I'm
creating something similar to a Subversion server, but instead of having
users committing code, the software is "committing" data using
Subversion as its backend. (Subversion is totally taking the place of
the database, in this case, MySQL. I'm not sure if this is an
"intelligent" decision yet, but is sure is cool. :) )

>
> * Only one thread may operate on any given filesystem object at once.
> * Two threads may access the same filesystem simultaneously only if
> * they open separate filesystem objects.
> *
> * @note You probably don't want to use this directly. Take a look at
> * svn_repos_open() instead.
> *
> * @since New in 1.1.
> */
> svn_error_t *svn_fs_open(svn_fs_t **fs_p, const char *path,
> apr_hash_t *fs_config, apr_pool_t *pool);
>
> In my multithreaded Python Ice Subversion server, I have a pool of
> svn_fs_t's that are checked out and checked back in per RPC request. If
> the pool is empty, I just create a new svn_fs_t.

Can you tell me what a svn_fs_t stands for? A quick google didn't turn
anything up.

Also, is there a book I really should be reading? I've gotten pretty far
on my own, but it seems now I'm getting deeper into Subversion than I
had expected (this isn't a bad thing).

>
> Regards,
> Blair

Thanks a lot for your help!
Tim

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jul 19 08:31:34 2007

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.