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

Re: [PATCH] fsfs: don't write out revified txn noderev

From: David Glasser <glasser_at_davidglasser.net>
Date: 2007-10-12 23:03:21 CEST

On 10/11/07, David Glasser <glasser@davidglasser.net> wrote:
> In the midst of fs_fs.c(write_final_rev), the transaction
> node_revision_t is upgraded into a revision node_revision_t and
> written to the protorev file.
>
> And then for some reason it's written back to the transaction
> directory, even though it now has a revision-style node ID and so on.
> Certainly seems like it could cause some corruption if, say, the
> commit attempt crashed and a future session reopened the same
> transaction.
>
> Is there anything wrong with the following patch?
>
> [[[
> Don't write out noderevs with immutable content to the mutable area.
>
> * subversion/libsvn_fs_fs/fs_fs.c
> (write_final_rev): Don't write the upgraded noderev back to the transaction
> directory.
> ]]]
>
> Index: subversion/libsvn_fs_fs/fs_fs.c
> ===================================================================
> --- subversion/libsvn_fs_fs/fs_fs.c (revision 27131)
> +++ subversion/libsvn_fs_fs/fs_fs.c (working copy)
> @@ -4455,8 +4455,6 @@
> /* Write out our new node-revision. */
> SVN_ERR(write_noderev_txn(file, noderev, pool));
>
> - SVN_ERR(svn_fs_fs__put_node_revision(fs, id, noderev, FALSE, pool));
> -
> /* Return our ID that references the revision file. */
> *new_id_p = noderev->id;

I committed this in r27161, but still wouldn't mind review. (Tests do pass.)

--dave

-- 
David Glasser | glasser_at_davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Oct 12 23:03:31 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.