You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Kamesh Jayachandran <ka...@collab.net> on 2007/01/04 15:36:05 UTC
[PATCH][merge-tracking]Remove svn_fs_merge_info__create_index thanks
to r22885
Hi All,
Find the attached patch and log.
With regards
Kamesh Jayachandran
Re: [PATCH][merge-tracking]Remove svn_fs_merge_info__create_index
thanks to r22885
Posted by Kamesh Jayachandran <ka...@collab.net>.
Sorry I am wrong.
I fail to realize that open_db creates a schema too.
With regards
Kamesh Jayachandran
Kamesh Jayachandran wrote:
> Dan,
> r22885 made 'svn_fs_merge_info__create_index' just opens a db and
> closes it (NO-OP).
>
> You mean 'svn_fs_merge_info__create_index' should create schema.
>
> I tend to think the same.
>
> With regards
> Kamesh Jayachandran
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH][merge-tracking]Remove svn_fs_merge_info__create_index
thanks to r22885
Posted by Kamesh Jayachandran <ka...@collab.net>.
Dan,
r22885 made 'svn_fs_merge_info__create_index' just opens a db and closes
it (NO-OP).
You mean 'svn_fs_merge_info__create_index' should create schema.
I tend to think the same.
With regards
Kamesh Jayachandran
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH][merge-tracking]Remove svn_fs_merge_info__create_index thanks to r22885
Posted by Daniel Rall <dl...@collab.net>.
On Thu, 04 Jan 2007, Malcolm Rowe wrote:
> On Thu, Jan 04, 2007 at 11:20:24AM -0800, Daniel Rall wrote:
> > I'm not sure about this. I like the fact that 'svnadmin create'
> > attempts to create the sqlite merge info index, and think that it
> > should continue to do so, on the grounds that it provides a "fail
> > fast" behavior.
>
> There's arguments for both ways, I think. Creating the index on-demand
> means that we get the same code path and behaviour for repositories that
> are upgraded and those that are created with 1.5, for example.
>
> But why not remove the explicit creation logic and just exercise the
> on-demand code at creation time (by running a dummy query). That way,
> you get the benefit of failure at repository creation time together with
> a single code path to test.
>
> Alternatively, keep the explicit creation - it's really not that much
> code.
So long as 'svnadmin create' continues to create the merge info index,
either implementation sounds okay to me.
Re: [PATCH][merge-tracking]Remove svn_fs_merge_info__create_index thanks to r22885
Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Thu, Jan 04, 2007 at 11:20:24AM -0800, Daniel Rall wrote:
> I'm not sure about this. I like the fact that 'svnadmin create'
> attempts to create the sqlite merge info index, and think that it
> should continue to do so, on the grounds that it provides a "fail
> fast" behavior.
>
There's arguments for both ways, I think. Creating the index on-demand
means that we get the same code path and behaviour for repositories that
are upgraded and those that are created with 1.5, for example.
But why not remove the explicit creation logic and just exercise the
on-demand code at creation time (by running a dummy query). That way,
you get the benefit of failure at repository creation time together with
a single code path to test.
Alternatively, keep the explicit creation - it's really not that much
code.
Regards,
Malcolm
Re: [PATCH][merge-tracking]Remove svn_fs_merge_info__create_index thanks to r22885
Posted by Daniel Rall <dl...@collab.net>.
I'm not sure about this. I like the fact that 'svnadmin create'
attempts to create the sqlite merge info index, and think that it
should continue to do so, on the grounds that it provides a "fail
fast" behavior.
On Thu, 04 Jan 2007, Kamesh Jayachandran wrote:
...
> [[[
>
> r22885 made the mergeinfo creation part of regular database open
> operation. So we don't need 'svn_fs_merge_info__create_index' anymore.
>
> * subversion/libsvn_fs_util/merge-info-sqlite-index.c
> (global): Remove svn_fs_merge_info__create_index implementation.
>
> * subversion/include/private/svn_fs_merge_info.h
> (global): Remove prototype declaration of 'svn_fs_merge_info__create_index'.
>
> * subversion/libsvn_fs_fs/fs_fs.c
> (svn_fs_fs__create):
> Remove call to 'svn_fs_merge_info__create_index'.
>
> * subversion/libsvn_fs_base/fs.c
> (base_create):
> Remove call to 'svn_fs_merge_info__create_index'.
>
> Patch by: kameshj
> ]]]
> Index: subversion/libsvn_fs_base/fs.c
> ===================================================================
> --- subversion/libsvn_fs_base/fs.c (revision 22899)
> +++ subversion/libsvn_fs_base/fs.c (working copy)
> @@ -645,7 +645,6 @@
> (svn_path_join(fs->path, FORMAT_FILE, pool), format, pool);
> if (svn_err) goto error;
>
> - SVN_ERR(svn_fs_merge_info__create_index(path, pool));
> return SVN_NO_ERROR;
>
> error:
> Index: subversion/libsvn_fs_util/merge-info-sqlite-index.c
> ===================================================================
> --- subversion/libsvn_fs_util/merge-info-sqlite-index.c (revision 22899)
> +++ subversion/libsvn_fs_util/merge-info-sqlite-index.c (working copy)
> @@ -169,17 +169,6 @@
> return err;
> }
>
> -/* Create an sqlite DB for our merge info index under PATH. Use POOL
> - for temporary allocations. */
> -svn_error_t *
> -svn_fs_merge_info__create_index(const char *path, apr_pool_t *pool)
> -{
> - sqlite3 *db;
> - SVN_ERR(open_db(&db, path, pool));
> - SQLITE_ERR(sqlite3_close(db), db);
> - return SVN_NO_ERROR;
> -}
> -
> /* Insert the necessary indexing data into the DB for all the merges
> on PATH as of NEW_REV, which is provided (unparsed) in MINFOSTRING.
> Use POOL for temporary allocations.*/
> Index: subversion/include/private/svn_fs_merge_info.h
> ===================================================================
> --- subversion/include/private/svn_fs_merge_info.h (revision 22899)
> +++ subversion/include/private/svn_fs_merge_info.h (working copy)
> @@ -27,11 +27,6 @@
> /* The name of the sqlite merge info database. */
> #define SVN_FS_MERGE_INFO__DB_NAME "mergeinfo.db"
>
> -/* Create the merge info index under PATH. Use POOL for any temporary
> - allocations. */
> -svn_error_t *
> -svn_fs_merge_info__create_index(const char *path, apr_pool_t *pool);
> -
> /* Update the merge info index according to the changes made in
> transaction TXN for revision NEW_REV, if TXN_CONTAINS_MERGE_INFO is
> TRUE. Use POOL for any temporary allocations. */
> Index: subversion/libsvn_fs_fs/fs_fs.c
> ===================================================================
> --- subversion/libsvn_fs_fs/fs_fs.c (revision 22899)
> +++ subversion/libsvn_fs_fs/fs_fs.c (working copy)
> @@ -4574,7 +4574,6 @@
> (path_format(fs, pool), format, pool));
> ((fs_fs_data_t *) fs->fsap_data)->format = format;
>
> - SVN_ERR(svn_fs_merge_info__create_index(path, pool));
> return SVN_NO_ERROR;
> }