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

Concurrency in filesystem's, root's and txn's

From: Blair Zajac <blair_at_orcaware.com>
Date: Mon, 07 Jan 2008 10:51:23 -0800

I'm writing a multithreaded server that uses Subversion as a backend database.
The server exposes an object oriented view of repositories, filesystem roots,
transactions', etc so clients can refer to them explicitly.

For each RPC I pull from an LRU cache an svn object and return it to the cache
when it is completed, thereby saving IO and avoiding any concurrency issues
since any svn object is in use by only one thread.

Since txn's are mutable, I am caching the fs root but opening a new transaction
object anytime the transaction is modified.

I was looking through svnserve and it appears to open a new fs root for each
operation, so there's no concurrency issues there.

Are there any problems with using revision fs roots across different threads at
the same time? Can you have a single svn_fs_t shared by multiple threads, each
thread doing work with different revisions or tnx roots?

So what is safe and what isn't?

Thanks,
Blair

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-01-07 19:51:39 CET

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