You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/03/30 19:06:47 UTC

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.
  *
  * The optional @a notify_func callback is only a general feedback that
  * the operation is still in process but may be called in random revisions
@@ -2449,9 +2453,12 @@ svn_fs_pack(const char *db_path,
  * revisions, you must call this function *and* #svn_fs_verify_rev.
  * 
  * @note Implementors, please do tests that can be done efficiently for
- * a single revision to #svn_fs_verify_rev.  This function is meant for
+ * a single revision in #svn_fs_verify_root.  This function is meant for
  * global checks or tests that require an expensive context setup.
  *
+ * @see svn_repos_verify_fs2()
+ * @see svn_fs_verify_root()
+ *
  * @since New in 1.8.
  */
 svn_error_t *

Modified: subversion/trunk/subversion/include/svn_ra_svn.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_ra_svn.h?rev=1462828&r1=1462827&r2=1462828&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_ra_svn.h (original)
+++ subversion/trunk/subversion/include/svn_ra_svn.h Sat Mar 30 18:06:47 2013
@@ -231,6 +231,14 @@ typedef enum svn_ra_svn_cmd_t
  * @a compression_level specifies the desired network data compression
  * level (zlib) from 0 (no compression) to 9 (best but slowest).
  *
+ * If @a zero_copy_limit is not 0, cached file contents smaller than the
+ * given limit may be sent directly to the network socket.  Otherwise,
+ * it will be copied into a temporary buffer before being forwarded to
+ * the network stack.  Since the zero-copy code path has to enforce strict
+ * time-outs, the receiver must be able to process @a zero_copy_limit
+ * bytes within one second.  Even temporary failure to do so may cause
+ * the server to cancel the respective operation with a time-out error.
+ *
  * To reduce the overhead of checking for cancellation requests from the
  * data receiver, set @a error_check_interval to some non-zero value.
  * It defines the number of bytes that must have been sent since the last



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>*
*

*

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

Posted by Bert Huijben <be...@qqmail.nl>.

> -----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