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

Re: SVN 1.7/1.8 "commit after delete" performance issue

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Tue, 30 Jul 2013 14:32:49 +0100

Philip Martin <philip.martin_at_wandisco.com> writes:

> Index: subversion/libsvn_client/commit.c
> ===================================================================
> --- subversion/libsvn_client/commit.c (revision 1508338)
> +++ subversion/libsvn_client/commit.c (working copy)
> @@ -1027,8 +1027,14 @@ svn_client_commit6(const apr_array_header_t *targe
> cleanup:
> /* Sleep to ensure timestamp integrity. */
> if (timestamp_sleep)
> - svn_io_sleep_for_timestamps(base_abspath, pool);
> + {
> + const char *wcroot_abspath;
>
> + SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, base_abspath,
> + pool, pool));

This bit doesn't work when committing from multiple working copies as
then base_abspath isn't guaranteed to be part of any working copy.

I'm not really clear how we choose the right path when there are
multiple working copies. Perhaps we should pass NULL and accept the
longer/slower sleep? I note that update already adopts this strategy.

> + svn_io_sleep_for_timestamps(wcroot_abspath, pool);
> + }
> +
> /* Abort the commit if it is still in progress. */
> svn_pool_clear(iterpool); /* Close open handles before aborting */
> if (commit_in_progress)
> Index: subversion/libsvn_client/update.c
> ===================================================================
> --- subversion/libsvn_client/update.c (revision 1508338)
> +++ subversion/libsvn_client/update.c (working copy)
> @@ -701,7 +701,17 @@ svn_client_update4(apr_array_header_t **result_rev
>
> cleanup:
> if (sleep)
> - svn_io_sleep_for_timestamps((paths->nelts == 1) ? path : NULL, pool);
> + {
> + const char *wcroot_abspath;
>
> + if (paths->nelts == 1)
> + SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, path,
> + pool, pool));

This bit doesn't quite work either because path isn't guaranteed to be
an abspath at this point so we need an abspath conversion.

> + else
> + wcroot_abspath = NULL;
> +
> + svn_io_sleep_for_timestamps(wcroot_abspath, pool);
> + }
> +
> return svn_error_trace(err);
> }

-- 
Philip Martin | Subversion Committer
WANdisco | Non-Stop Data
Received on 2013-07-30 15:33:28 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.