[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: Blair Zajac <blair_at_orcaware.com>
Date: 2007-07-19 08:03:07 CEST

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?

  * 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.

Regards,
Blair

-- 
Blair Zajac, Ph.D.
<blair@orcaware.com>
Subversion training, consulting and support
http://www.orcaware.com/svn/
---------------------------------------------------------------------
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:02:24 2007

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