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

Re: [PATCH] Change svn_fs_root_t to include pointer to related txn

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2005-12-13 23:16:01 CET

On Tue, 2005-12-13 at 20:32 +0000, Malcolm Rowe wrote:
> No, because I'd like to create or open the file in the implementations of
> svn_fs_create_txn2() and svn_fs_open_txn(), which create transactions,
> not transaction roots. Sorry if that wasn't clear (I see now that I
> forgot to mention that little point, oops).

Why do you want to do it there?

If the goal is to ensure that multiple roots for a single transaction
use the same file, you may have to cache the file handle in the svn_fs_t
object, since a caller could be using different handles to the same
transaction. If that's not the goal, then I'm not sure what the goal
is.

> I suppose I could attempt to remember whether the transaction was new
> or not, and use that to decide whether to create or open the file as
> necessary (though note that I'm not planning to change the next-ids
> or rev-props files, so they'd still be initialised in _create_txn2()),
> but that all seems very messy, and I'd still need a way to tie back to
> the transaction.

If the messy bit is just "open the file if it's not already open yet",
I'm not sure that justifies a design change like this. If we're going
to change the FS model, I think we want to look into getting rid of
transactions as an object type, not intertwining them better with roots.
(Although that would require revving some APIs.)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Dec 13 23:24:14 2005

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.