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

Re: svn commit: r1296604 - in /subversion/trunk/subversion/libsvn_fs_fs: caching.c fs.h fs_fs.c

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Mon, 05 Mar 2012 12:14:21 +0000

Philip Martin <philip.martin_at_wandisco.com> writes:

> Without the cache change_rev_prop_body would return
> SVN_ERR_FS_PROP_BASEVALUE_MISMATCH if the current value doesn't match
> the supplied value. The cache means the current value might be
> out-of-date.

I can demonstrate a race. Set log to 'xx'

$ svn ps --revprop -r3 svn:log xx file://`pwd`/repo

Start a change to 'yy':

$ gdb -arg svn ps --revprop -r3 svn:log yy file://`pwd`/repo
(gdb) b svn_fs_fs__change_rev_prop
(gdb) r
breakpoint 1

Racing change to 'zz':

$ svn ps --revprop -r3 svn:log zz file://`pwd`/repo

Continue change to 'yy'

(gdb) b change_rev_prop_body
(gdb) c
breakpoint 2
(gbd) n
(gbd) n
7683 if (cb->old_value_p)
(gdb) p cb->old_value_p[0].data
$2 = 0x68bbf8 "xx"

The "atomic" change is being done based on the ood value.

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com
Received on 2012-03-05 13:14:57 CET

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.