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

Re: svn commit: r1326307 - in /subversion/trunk: ./ build/ac-macros/ subversion/include/ subversion/include/private/ subversion/libsvn_fs_fs/ subversion/libsvn_subr/ subversion/mod_dav_svn/ subversion/svnadmin/ subversion/svnserve/ subversion/tests/ subver...

From: Blair Zajac <blair_at_orcaware.com>
Date: Sun, 15 Apr 2012 07:59:45 -0700

On 04/15/2012 04:20 AM, stefan2_at_apache.org wrote:
> Author: stefan2
> Date: Sun Apr 15 11:20:58 2012
> New Revision: 1326307
>
> URL: http://svn.apache.org/viewvc?rev=1326307&view=rev
> Log:
> Merge all changes (-r1298521-1326293) from branches/revprop-cache to trunk
> and resolve minor conflicts.

> +/* Test whether revprop cache and necessary infrastructure are
> + available in FS. */
> +static svn_boolean_t
> +has_revprop_cache(svn_fs_t *fs)
> +{
> + fs_fs_data_t *ffd = fs->fsap_data;
> + svn_error_t *error;
> +
> + /* is the cache (still) enabled? */
> + if (ffd->revprop_cache == NULL)
> + return FALSE;
> +
> + /* try to access our SHM-backed infrastructure */
> + error = ensure_revprop_generation(fs);
> + if (error)
> + {
> + /* failure -> disable revprop cache for good */
> +
> + svn_error_clear(error);

Should we log why it was disabled instead of silently doing so? I would
want a way to determine why it was disabled.

How about returning the error to the caller so they can log it? They
can check the svn_error_t == SVN_NO_ERROR to see if it's enabled or not.

> +/* Read the current revprop generation and return it in *GENERATION.
> + Also, detect aborted / crashed writers and recover from that.
> + Use the access object in FS to set the shared mem values. */
> +static svn_error_t *
> +read_revprop_generation(svn_fs_t *fs,
> + apr_int64_t *generation)

Out parameters are normally listed first.

Blair
Received on 2012-04-15 17:00:18 CEST

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.