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 2013/04/01 19:22:19 UTC

RE: svn commit: r1462828 - in /subversion/trunk/subversion/include: svn_fs.h svn_ra_svn.h


> -----Original Message-----
> From: stefan2@apache.org [mailto:stefan2@apache.org]
> Sent: zaterdag 30 maart 2013 19:07
> To: commits@subversion.apache.org
> Subject: svn commit: r1462828 - in /subversion/trunk/subversion/include:
> svn_fs.h svn_ra_svn.h
> 
> Author: stefan2
> Date: Sat Mar 30 18:06:47 2013
> New Revision: 1462828
> 
> URL: http://svn.apache.org/r1462828
> Log:
> Incorporate API review feedback for svn_fs.h and svn_ra_svn.h
> 
> * subversion/include/svn_fs.h
>   (svn_fs_verify): rewrite the docstring for @a start and @a end;
>                    add cross-references
> 
> * subversion/include/svn_ra_svn.h
>   (svn_ra_svn_create_conn3): document @a zero_copy_limit parameter
> 
> Modified:
>     subversion/trunk/subversion/include/svn_fs.h
>     subversion/trunk/subversion/include/svn_ra_svn.h
> 
> Modified: subversion/trunk/subversion/include/svn_fs.h
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_fs.
> h?rev=1462828&r1=1462827&r2=1462828&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/include/svn_fs.h (original)
> +++ subversion/trunk/subversion/include/svn_fs.h Sat Mar 30 18:06:47 2013
> @@ -2425,13 +2425,17 @@ svn_fs_pack(const char *db_path,
>   * to the Subversion filesystem (mainly the meta-data) located in the
>   * directory @a path.  Use @a scratch_pool for temporary allocations.
>   *
> - * @a start and @a end are used to limit the amount of checks being done
> - * to data that is relevant to that range of revisions.  However, this is
> - * only a lower limit to the actual amount of checks being done.  The
> - * backend may not even be able to limit the errors begin reported.
> - * @a start and @a end may be #SVN_INVALID_REVNUM, in which case
> - * svn_repos_verify_fs2()'s semantics apply.  When @c r0 is being
> - * verified, global invariants may be verified as well.
> + * Repository (meta) data forms a tightly knit network of references.
> + * A full check can be expensive and may not always be required.  If not
> + * equal to #SVN_INVALID_REVNUM, @a start and @a end define the
> range of
> + * revisions to check, @c r0 and @a HEAD being the respective defaults.
> + * Due to the references among repository (meta) data, the
> implementation
> + * may however need to also check elements that are not strictly part of
> + * the selected range of revisions.  Thus, it is perfectly legal for a FS
> + * implementation to ignore the @a start and @a end parameters entirely.
> + *
> + * Only if @c r0 has been included in the range of revisions to check,
> + * are global invariants guaranteed to get verified.

Before this patch the comment documented that global invariants *may be* checked by this function if r0 is included. After this patch it guarantees that *all* global invariants are verified.
(I'm not sure how we would ever be able to guarantee that?)

	Bert 



Re: svn commit: r1462828 - in /subversion/trunk/subversion/include: svn_fs.h svn_ra_svn.h

Posted by Stefan Fuhrmann <st...@wandisco.com>.
On Mon, Apr 1, 2013 at 7:22 PM, Bert Huijben <be...@qqmail.nl> wrote:

>
>
> > -----Original Message-----
> > From: stefan2@apache.org [mailto:stefan2@apache.org]
> > Sent: zaterdag 30 maart 2013 19:07
> > To: commits@subversion.apache.org
> > Subject: svn commit: r1462828 - in /subversion/trunk/subversion/include:
> > svn_fs.h svn_ra_svn.h
> >
> > Author: stefan2
> > Date: Sat Mar 30 18:06:47 2013
> > New Revision: 1462828
> >
> > URL: http://svn.apache.org/r1462828
> > Log:
> > Incorporate API review feedback for svn_fs.h and svn_ra_svn.h
> >
>


> > + * Only if @c r0 has been included in the range of revisions to check,
> > + * are global invariants guaranteed to get verified.
>
> Before this patch the comment documented that global invariants *may be*
> checked by this function if r0 is included. After this patch it guarantees
> that *all* global invariants are verified.
> (I'm not sure how we would ever be able to guarantee that?)
>

The user question I try to answer here is: "what do I have to
specify to make sure that global invariants (i.e. not linked to
any specific revision) get checked, too?". There is no guarantee
that checks in svn_fs_verify are complete in the first place.

It will hopefully catch most issues but there will be conditions
that are "implicit" etc. and won't be checked. Think about
warnings that we might issue in later versions.

-- Stefan^2.

-- 
*Join one of our free daily demo sessions on* *Scaling Subversion for the
Enterprise <http://www.wandisco.com/training/webinars>*
*

*