You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Bert Huijben <be...@qqmail.nl> on 2012/07/25 13:04:46 UTC

RE: svn commit: r1365518 - /subversion/trunk/subversion/libsvn_fs_fs/rep-cache.c


> -----Original Message-----
> From: philip@apache.org [mailto:philip@apache.org]
> Sent: woensdag 25 juli 2012 13:01
> To: commits@subversion.apache.org
> Subject: svn commit: r1365518 -
> /subversion/trunk/subversion/libsvn_fs_fs/rep-cache.c
> 
> Author: philip
> Date: Wed Jul 25 11:01:26 2012
> New Revision: 1365518
> 
> URL: http://svn.apache.org/viewvc?rev=1365518&view=rev
> Log:
> Fix issue 4029, verify fails on r0 for FSFS repo with empty rep-cache.
> 
> * subversion/libsvn_fs_fs/rep-cache.c
>   (svn_fs_fs__walk_rep_reference): Handle empty cache, remove pointless
>    comment.
> 
> Modified:
>     subversion/trunk/subversion/libsvn_fs_fs/rep-cache.c
> 
> Modified: subversion/trunk/subversion/libsvn_fs_fs/rep-cache.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/re
> p-cache.c?rev=1365518&r1=1365517&r2=1365518&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/libsvn_fs_fs/rep-cache.c (original)
> +++ subversion/trunk/subversion/libsvn_fs_fs/rep-cache.c Wed Jul 25
> 11:01:26 2012
> @@ -158,11 +158,11 @@ svn_fs_fs__walk_rep_reference(svn_fs_t *
>                                          STMT_GET_MAX_REV));
>        SVN_ERR(svn_sqlite__step(&have_row, stmt2));
>        max = svn_sqlite__column_revnum(stmt2, 0);
> -      SVN_ERR(svn_fs_fs__revision_exists(max, fs, iterpool));
> +      if (SVN_IS_VALID_REVNUM(max))  /* The rep-cache could be empty. */
> +        SVN_ERR(svn_fs_fs__revision_exists(max, fs, iterpool));
>        SVN_ERR(svn_sqlite__reset(stmt2));

Not really part of this patch, but this code will not call sqlite__reset on failure which will keep the sqlite database read-locked until it is reset or the sqlite database closed.

	Bert
>      }
> 
> -  /* Get the statement. (There are no arguments to bind.) */
>    SVN_ERR(svn_sqlite__get_statement(&stmt, ffd->rep_cache_db,
>                                      STMT_GET_REPS_FOR_RANGE));
>    SVN_ERR(svn_sqlite__bindf(stmt, "rr",
> 



Re: svn commit: r1365518 - /subversion/trunk/subversion/libsvn_fs_fs/rep-cache.c

Posted by Philip Martin <ph...@wandisco.com>.
"Bert Huijben" <be...@qqmail.nl> writes:

>>        SVN_ERR(svn_sqlite__step(&have_row, stmt2));
>>        max = svn_sqlite__column_revnum(stmt2, 0);
>> -      SVN_ERR(svn_fs_fs__revision_exists(max, fs, iterpool));
>> +      if (SVN_IS_VALID_REVNUM(max))  /* The rep-cache could be empty. */
>> +        SVN_ERR(svn_fs_fs__revision_exists(max, fs, iterpool));
>>        SVN_ERR(svn_sqlite__reset(stmt2));
>
> Not really part of this patch, but this code will not call
> sqlite__reset on failure which will keep the sqlite database
> read-locked until it is reset or the sqlite database closed.

The same problem occurs throughout the file. I've raised

http://subversion.tigris.org/issues/show_bug.cgi?id=4210

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download