You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2011/07/09 01:23:27 UTC
svn commit: r1144550 - in /subversion/trunk: ./ subversion/include/private/
subversion/libsvn_fs_fs/ subversion/libsvn_subr/
Author: danielsh
Date: Fri Jul 8 23:23:27 2011
New Revision: 1144550
URL: http://svn.apache.org/viewvc?rev=1144550&view=rev
Log:
For issue #3952, drop support for revprop packing from trunk. This revision
removes that support wholesale, not only the SQLite-specific parts.
This merges r1143907 from the revprop-packing branch, which removed some
SQLite-specific code, and in addition removes all instances in fs_fs.c of
if (ffd->format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
.
The merge-back should not be a problem, since all those new-in-this-revision
changes are not intended to be made on the branch.
* subversion/libsvn_fs_fs/fs.h
(PATH_MIN_UNPACKED_REVPROP, PATH_REVPROPS_DB): Remove.
(fs_fs_data_t.min_unpacked_revprop, fs_fs_data_t.revprop_db): Remove.
* subversion/libsvn_fs_fs/fs_fs.c
(revprops-db.h): Remove include.
(REVPROPS_DB_SQL_DECLARE_STATEMENTS): Remove.
(update_min_unpacked_revprop, path_min_unpacked_revprop,
create_packed_revprops_db, pack_revprop_shard): Remove.
(is_packed_revprop): Retain, but hard-wire to FALSE always. (It is
presently only used in assert() calls.)
(with_some_lock): Don't update_min_unpacked_revprop().
(svn_fs_fs__open, upgrade_body, svn_fs_fs__hotcopy, set_revision_proplist,
revision_proplist, svn_fs_fs__create):
Don't refer to revprops.db or min-unpacked-revprop.
(svn_fs_fs__revision_proplist):
Stop accounting for concurrent revprop packing.
(commit_body): Add a comment. (The fix was done in r1144530.)
(recover_body): Remove a special case.
[ In answer to the ### question I remove, our code creates an empty skel
in revprops.db when all revprops are deleted. ]
(pack_body):
Don't refer to revprops.db or min-unpacked-revprop.
* build.conf
(private-includes): Remove revprops-db.h.
(revprops): Remove.
* subversion/libsvn_fs_fs/revprops-db.sql:
Remove.
Removed:
subversion/trunk/subversion/libsvn_fs_fs/revprops-db.sql
Modified:
subversion/trunk/ (props changed)
subversion/trunk/build.conf
subversion/trunk/subversion/include/private/svn_adler32.h (props changed)
subversion/trunk/subversion/include/private/svn_string_private.h (props changed)
subversion/trunk/subversion/include/private/svn_temp_serializer.h (props changed)
subversion/trunk/subversion/libsvn_fs_fs/fs.h
subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c (props changed)
subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.h (props changed)
subversion/trunk/subversion/libsvn_subr/adler32.c (props changed)
subversion/trunk/subversion/libsvn_subr/svn_temp_serializer.c (props changed)
Propchange: subversion/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 8 23:23:27 2011
@@ -39,7 +39,7 @@
/subversion/branches/py-tests-as-modules:956579-1033052
/subversion/branches/ra_serf-digest-authn:875693-876404
/subversion/branches/reintegrate-improvements:873853-874164
-/subversion/branches/revprop-packing:1143971,1143997,1144017,1144499
+/subversion/branches/revprop-packing:1143907,1143971,1143997,1144017,1144499
/subversion/branches/subtree-mergeinfo:876734-878766
/subversion/branches/svn-mergeinfo-enhancements:870119-870195,870197-870288
/subversion/branches/svn-patch-improvements:918519-934609
Modified: subversion/trunk/build.conf
URL: http://svn.apache.org/viewvc/subversion/trunk/build.conf?rev=1144550&r1=1144549&r2=1144550&view=diff
==============================================================================
--- subversion/trunk/build.conf (original)
+++ subversion/trunk/build.conf Fri Jul 8 23:23:27 2011
@@ -41,7 +41,6 @@ private-includes =
private-built-includes =
subversion/svn_private_config.h
subversion/libsvn_fs_fs/rep-cache-db.h
- subversion/libsvn_fs_fs/revprops-db.h
subversion/libsvn_wc/wc-metadata.h
subversion/libsvn_wc/wc-queries.h
subversion/libsvn_wc/wc-checks.h
@@ -373,12 +372,6 @@ type = sql-header
path = subversion/libsvn_fs_fs
sources = rep-cache-db.sql
-[revprops]
-description = Schema for revprop packing
-type = sql-header
-path = subversion/libsvn_fs_fs
-sources = revprops-db.sql
-
[wc_queries]
desription = Queries on the WC database
type = sql-header
Propchange: subversion/trunk/subversion/include/private/svn_adler32.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 8 23:23:27 2011
@@ -31,7 +31,7 @@
/subversion/branches/py-tests-as-modules/subversion/libsvn_diff/diff.h:956579-1033052
/subversion/branches/ra_serf-digest-authn/subversion/libsvn_diff/diff.h:875693-876404
/subversion/branches/reintegrate-improvements/subversion/libsvn_diff/diff.h:873853-874164
-/subversion/branches/revprop-packing/subversion/include/private/svn_adler32.h:1143971,1144017
+/subversion/branches/revprop-packing/subversion/include/private/svn_adler32.h:1143907,1143971,1144017
/subversion/branches/subtree-mergeinfo/subversion/libsvn_diff/diff.h:876734-878766
/subversion/branches/svn-mergeinfo-enhancements/subversion/libsvn_diff/diff.h:870119-870195,870197-870288
/subversion/branches/svn-patch-improvements/subversion/libsvn_diff/diff.h:918519-934609
Propchange: subversion/trunk/subversion/include/private/svn_string_private.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 8 23:23:27 2011
@@ -39,7 +39,7 @@
/subversion/branches/py-tests-as-modules/subversion/include/svn_string.h:956579-1033052
/subversion/branches/ra_serf-digest-authn/subversion/include/svn_string.h:875693-876404
/subversion/branches/reintegrate-improvements/subversion/include/svn_string.h:873853-874164
-/subversion/branches/revprop-packing/subversion/include/private/svn_string_private.h:1143971,1144017
+/subversion/branches/revprop-packing/subversion/include/private/svn_string_private.h:1143907,1143971,1144017
/subversion/branches/subtree-mergeinfo/subversion/include/svn_string.h:876734-878766
/subversion/branches/svn-mergeinfo-enhancements/subversion/include/svn_string.h:870119-870195,870197-870288
/subversion/branches/svn-patch-improvements/subversion/include/svn_string.h:918519-934609
Propchange: subversion/trunk/subversion/include/private/svn_temp_serializer.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 8 23:23:27 2011
@@ -1,2 +1,2 @@
-/subversion/branches/revprop-packing/subversion/include/private/svn_temp_serializer.h:1143971,1144017
+/subversion/branches/revprop-packing/subversion/include/private/svn_temp_serializer.h:1143907,1143971,1144017
/subversion/trunk/subversion/include/private/svn_temp_serializer.h:1067687-1072301
Modified: subversion/trunk/subversion/libsvn_fs_fs/fs.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs.h?rev=1144550&r1=1144549&r2=1144550&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs.h Fri Jul 8 23:23:27 2011
@@ -60,10 +60,6 @@ extern "C" {
#define PATH_LOCKS_DIR "locks" /* Directory of locks */
#define PATH_MIN_UNPACKED_REV "min-unpacked-rev" /* Oldest revision which
has not been packed. */
-#define PATH_MIN_UNPACKED_REVPROP "min-unpacked-revprop" /* Oldest revision
- property which has
- not been packed. */
-#define PATH_REVPROPS_DB "revprops.db"
/* If you change this, look at tests/svn_test_fs.c(maybe_install_fsfs_conf) */
#define PATH_CONFIG "fsfs.conf" /* Configuration */
@@ -270,15 +266,9 @@ typedef struct fs_fs_data_t
/* Thread-safe boolean */
svn_atomic_t rep_cache_db_opened;
- /* The sqlite database used for revprops. */
- svn_sqlite__db_t *revprop_db;
-
/* The oldest revision not in a pack file. */
svn_revnum_t min_unpacked_rev;
- /* The oldest revision property not in a pack db. */
- svn_revnum_t min_unpacked_revprop;
-
/* Whether rep-sharing is supported by the filesystem
* and allowed by the configuration. */
svn_boolean_t rep_sharing_allowed;
Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c?rev=1144550&r1=1144549&r2=1144550&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Fri Jul 8 23:23:27 2011
@@ -59,8 +59,6 @@
#include "rep-cache.h"
#include "temp_serializer.h"
-#include "revprops-db.h"
-
#include "private/svn_fs_util.h"
#include "../libsvn_fs/fs-loader.h"
@@ -139,9 +137,6 @@ static txn_vtable_t txn_vtable = {
svn_fs_fs__change_txn_props
};
-/* SQL bits for revprops. */
-REVPROPS_DB_SQL_DECLARE_STATEMENTS(statements);
-
/* Declarations. */
static svn_error_t *
@@ -152,9 +147,6 @@ read_min_unpacked_rev(svn_revnum_t *min_
static svn_error_t *
update_min_unpacked_rev(svn_fs_t *fs, apr_pool_t *pool);
-static svn_error_t *
-update_min_unpacked_revprop(svn_fs_t *fs, apr_pool_t *pool);
-
/* Pathname helper functions */
/* Return TRUE is REV is packed in FS, FALSE otherwise. */
@@ -170,9 +162,13 @@ is_packed_rev(svn_fs_t *fs, svn_revnum_t
static svn_boolean_t
is_packed_revprop(svn_fs_t *fs, svn_revnum_t rev)
{
+#if 0
fs_fs_data_t *ffd = fs->fsap_data;
return (rev < ffd->min_unpacked_revprop);
+#else
+ return FALSE;
+#endif
}
static const char *
@@ -339,12 +335,6 @@ path_min_unpacked_rev(svn_fs_t *fs, apr_
return svn_dirent_join(fs->path, PATH_MIN_UNPACKED_REV, pool);
}
-static APR_INLINE const char *
-path_min_unpacked_revprop(svn_fs_t *fs, apr_pool_t *pool)
-{
- return svn_dirent_join(fs->path, PATH_MIN_UNPACKED_REVPROP, pool);
-}
-
static APR_INLINE const char *
path_txn_proto_rev(svn_fs_t *fs, const char *txn_id, apr_pool_t *pool)
@@ -600,8 +590,6 @@ with_some_lock(svn_fs_t *fs,
fs_fs_data_t *ffd = fs->fsap_data;
if (ffd->format >= SVN_FS_FS__MIN_PACKED_FORMAT)
SVN_ERR(update_min_unpacked_rev(fs, pool));
- if (ffd->format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
- SVN_ERR(update_min_unpacked_revprop(fs, pool));
#if 0 /* Might be a good idea? */
SVN_ERR(get_youngest(&ffd->youngest_rev_cache, fs->path,
pool));
@@ -1207,40 +1195,6 @@ update_min_unpacked_rev(svn_fs_t *fs, ap
}
static svn_error_t *
-update_min_unpacked_revprop(svn_fs_t *fs, apr_pool_t *pool)
-{
- fs_fs_data_t *ffd = fs->fsap_data;
-
- SVN_ERR_ASSERT(ffd->format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT);
-
- return read_min_unpacked_rev(&ffd->min_unpacked_revprop,
- path_min_unpacked_revprop(fs, pool),
- pool);
-}
-
-/* Create a new SQLite database for storing the revprops in filesystem FS.
- * Leave the DB open and set *SDB to its handle. Also create the "min
- * unpacked revprop" file. */
-static svn_error_t *
-create_packed_revprops_db(svn_sqlite__db_t **sdb,
- svn_fs_t *fs,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
-{
- SVN_ERR(svn_io_file_create(path_min_unpacked_revprop(fs, scratch_pool),
- "0\n", scratch_pool));
- SVN_ERR(svn_sqlite__open(sdb,
- svn_dirent_join_many(scratch_pool, fs->path,
- PATH_REVPROPS_DIR,
- PATH_REVPROPS_DB,
- NULL),
- svn_sqlite__mode_rwcreate, statements,
- 0, NULL, result_pool, scratch_pool));
- SVN_ERR(svn_sqlite__exec_statements(*sdb, STMT_CREATE_SCHEMA));
- return SVN_NO_ERROR;
-}
-
-static svn_error_t *
get_youngest(svn_revnum_t *youngest_p, const char *fs_path, apr_pool_t *pool);
svn_error_t *
@@ -1280,21 +1234,6 @@ svn_fs_fs__open(svn_fs_t *fs, const char
/* Read the configuration file. */
SVN_ERR(read_config(fs, pool));
- /* Open the revprops db. */
- if (ffd->format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
- {
- SVN_ERR(update_min_unpacked_revprop(fs, pool));
-
- SVN_ERR(svn_sqlite__open(&ffd->revprop_db, svn_dirent_join_many(
- pool, path,
- PATH_REVPROPS_DIR,
- PATH_REVPROPS_DB,
- NULL),
- svn_sqlite__mode_readwrite, statements,
- 0, NULL,
- fs->pool, pool));
- }
-
return get_youngest(&(ffd->youngest_rev_cache), path, pool);
}
@@ -1317,7 +1256,6 @@ static svn_error_t *
upgrade_body(void *baton, apr_pool_t *pool)
{
svn_fs_t *fs = baton;
- fs_fs_data_t *ffd = fs->fsap_data;
int format, max_files_per_dir;
const char *format_path = path_format(fs, pool);
svn_node_kind_t kind;
@@ -1372,13 +1310,6 @@ upgrade_body(void *baton, apr_pool_t *po
if (format < SVN_FS_FS__MIN_PACKED_FORMAT)
SVN_ERR(svn_io_file_create(path_min_unpacked_rev(fs, pool), "0\n", pool));
- /* If our filesystem is new enough, write the min unpacked revprop file,
- and create the database. */
- if (format < SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
- {
- SVN_ERR(create_packed_revprops_db(&ffd->revprop_db, fs, fs->pool, pool));
- }
-
/* Bump the format file. */
return write_format(format_path, SVN_FS_FS__FORMAT_NUMBER, max_files_per_dir,
TRUE, pool);
@@ -1539,7 +1470,7 @@ svn_fs_fs__hotcopy(const char *src_path,
apr_pool_t *pool)
{
const char *src_subdir, *dst_subdir;
- svn_revnum_t youngest, rev, min_unpacked_rev, min_unpacked_revprop;
+ svn_revnum_t youngest, rev, min_unpacked_rev;
apr_pool_t *iterpool;
svn_node_kind_t kind;
int format, max_files_per_dir;
@@ -1694,40 +1625,13 @@ svn_fs_fs__hotcopy(const char *src_path,
svn_pool_clear(iterpool);
}
- /* Copy the min unpacked revprop file, and read its value. */
- if (format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
- {
- const char *min_unpacked_revprop_path;
- min_unpacked_revprop_path = svn_dirent_join(src_path,
- PATH_MIN_UNPACKED_REVPROP,
- pool);
- SVN_ERR(svn_io_dir_file_copy(src_path, dst_path,
- PATH_MIN_UNPACKED_REVPROP, pool));
- SVN_ERR(read_min_unpacked_rev(&min_unpacked_revprop,
- min_unpacked_revprop_path, pool));
- }
- else
- {
- min_unpacked_revprop = 0;
- }
-
/* Copy the necessary revprop files. */
src_subdir = svn_dirent_join(src_path, PATH_REVPROPS_DIR, pool);
dst_subdir = svn_dirent_join(dst_path, PATH_REVPROPS_DIR, pool);
SVN_ERR(svn_io_make_dir_recursively(dst_subdir, pool));
- /* Copy the packed revprop db. */
- if (format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
- {
- const char *src_file = svn_dirent_join(src_subdir, PATH_REVPROPS_DB,
- pool);
- const char *dst_file = svn_dirent_join(dst_subdir, PATH_REVPROPS_DB,
- pool);
- SVN_ERR(svn_sqlite__hotcopy(src_file, dst_file, pool));
- }
-
- for (rev = min_unpacked_revprop; rev <= youngest; rev++)
+ for (rev = 0; rev <= youngest; rev++)
{
const char *src_subdir_shard = src_subdir,
*dst_subdir_shard = dst_subdir;
@@ -3036,13 +2940,9 @@ set_revision_proplist(svn_fs_t *fs,
apr_hash_t *proplist,
apr_pool_t *pool)
{
- fs_fs_data_t *ffd = fs->fsap_data;
- svn_sqlite__stmt_t *stmt;
-
SVN_ERR(ensure_revision_exists(fs, rev, pool));
- if (ffd->format < SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT ||
- rev >= ffd->min_unpacked_revprop)
+ if (1)
{
const char *final_path = path_revprops(fs, rev, pool);
const char *tmp_path;
@@ -3067,12 +2967,7 @@ set_revision_proplist(svn_fs_t *fs,
return SVN_NO_ERROR;
}
- SVN_ERR(svn_sqlite__get_statement(&stmt, ffd->revprop_db, STMT_SET_REVPROP));
-
- SVN_ERR(svn_sqlite__bind_int64(stmt, 1, rev));
- SVN_ERR(svn_sqlite__bind_properties(stmt, 2, proplist, pool));
-
- return svn_error_trace(svn_sqlite__insert(NULL, stmt));
+ return SVN_NO_ERROR;
}
static svn_error_t *
@@ -3081,13 +2976,11 @@ revision_proplist(apr_hash_t **proplist_
svn_revnum_t rev,
apr_pool_t *pool)
{
- fs_fs_data_t *ffd = fs->fsap_data;
apr_hash_t *proplist;
SVN_ERR(ensure_revision_exists(fs, rev, pool));
- if (ffd->format < SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT ||
- rev >= ffd->min_unpacked_revprop)
+ if (1)
{
apr_file_t *revprop_file = NULL;
svn_error_t *err = SVN_NO_ERROR;
@@ -3140,23 +3033,6 @@ revision_proplist(apr_hash_t **proplist_
return svn_error_trace(err);
svn_pool_destroy(iterpool);
}
- else
- {
- svn_sqlite__stmt_t *stmt;
- svn_boolean_t have_row;
-
- SVN_ERR(svn_sqlite__get_statement(&stmt, ffd->revprop_db,
- STMT_GET_REVPROP));
- SVN_ERR(svn_sqlite__bind_int64(stmt, 1, rev));
- SVN_ERR(svn_sqlite__step(&have_row, stmt));
- if (!have_row)
- return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
- _("Missing %ld row in %s"),
- rev, PATH_REVPROPS_DB);
-
- SVN_ERR(svn_sqlite__column_properties(&proplist, stmt, 0, pool, pool));
- SVN_ERR(svn_sqlite__reset(stmt));
- }
*proplist_p = proplist;
@@ -3169,22 +3045,7 @@ svn_fs_fs__revision_proplist(apr_hash_t
svn_revnum_t rev,
apr_pool_t *pool)
{
- svn_error_t *err;
- fs_fs_data_t *ffd = fs->fsap_data;
-
- err = revision_proplist(proplist_p, fs, rev, pool);
- if (err && err->apr_err == SVN_ERR_FS_NO_SUCH_REVISION
- && ffd->format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
- {
- /* If a pack is occurring simultaneously, the min-unpacked-revprop value
- could change, so reload it and then attempt to fetch these revprops
- again. */
- svn_error_clear(err);
- SVN_ERR(update_min_unpacked_revprop(fs, pool));
- SVN_ERR(revision_proplist(proplist_p, fs, rev, pool));
- }
- else if (err)
- return svn_error_trace(err);
+ SVN_ERR(revision_proplist(proplist_p, fs, rev, pool));
return SVN_NO_ERROR;
}
@@ -6509,6 +6370,7 @@ commit_body(void *baton, apr_pool_t *poo
new_dir, pool));
}
+ /* Create the revprops shard. */
assert(! is_packed_revprop(cb->fs, new_rev));
{
const char *new_dir = path_revprops_shard(cb->fs, new_rev, pool);
@@ -6750,12 +6612,6 @@ svn_fs_fs__create(svn_fs_t *fs,
pool),
pool));
- /* Write the min unpacked revprop file, and create the database. */
- if (format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
- {
- SVN_ERR(create_packed_revprops_db(&ffd->revprop_db, fs, fs->pool, pool));
- }
-
/* Create the transaction directory. */
SVN_ERR(svn_io_make_dir_recursively(svn_dirent_join(path, PATH_TXNS_DIR,
pool),
@@ -7159,25 +7015,7 @@ recover_body(void *baton, apr_pool_t *po
&youngest_revprops_kind, pool));
if (youngest_revprops_kind == svn_node_none)
{
- svn_boolean_t uhohs = TRUE;
-
- /* No file? Hrm... maybe that's because this repository is
- packed and the youngest revision is in the revprops.db
- file? We can at least see if that's a possibility.
-
- ### TODO: Could we check for revprops in the revprops.db?
- ### What if rNNN legitimately has no revprops? */
- if (ffd->format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
- {
- svn_revnum_t min_unpacked_revprop;
-
- SVN_ERR(read_min_unpacked_rev(&min_unpacked_revprop,
- path_min_unpacked_revprop(fs, pool),
- pool));
- if (min_unpacked_revprop == (max_rev + 1))
- uhohs = FALSE;
- }
- if (uhohs)
+ if (1)
{
return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
_("Revision %ld has a revs file but no "
@@ -7839,69 +7677,6 @@ pack_shard(const char *revs_dir,
return SVN_NO_ERROR;
}
-static svn_error_t *
-pack_revprop_shard(svn_fs_t *fs,
- const char *revprops_dir,
- const char *fs_path,
- apr_int64_t shard,
- int max_files_per_dir,
- svn_fs_pack_notify_t notify_func,
- void *notify_baton,
- svn_cancel_func_t cancel_func,
- void *cancel_baton,
- apr_pool_t *pool)
-{
- fs_fs_data_t *ffd = fs->fsap_data;
- const char *shard_path;
- svn_revnum_t start_rev, end_rev, rev;
- svn_sqlite__stmt_t *stmt;
- apr_pool_t *iterpool;
-
- shard_path = svn_dirent_join(revprops_dir,
- apr_psprintf(pool, "%" APR_INT64_T_FMT, shard),
- pool);
-
- /* Notify caller we're starting to pack this shard. */
- if (notify_func)
- SVN_ERR(notify_func(notify_baton, shard, svn_fs_pack_notify_start_revprop,
- pool));
-
- start_rev = (svn_revnum_t) (shard * max_files_per_dir);
- end_rev = (svn_revnum_t) ((shard + 1) * (max_files_per_dir) - 1);
- iterpool = svn_pool_create(pool);
-
- /* Iterate over the revisions in this shard, squashing them together. */
- SVN_ERR(svn_sqlite__get_statement(&stmt, ffd->revprop_db, STMT_SET_REVPROP));
- for (rev = start_rev; rev <= end_rev; rev++)
- {
- apr_hash_t *proplist;
- svn_pool_clear(iterpool);
-
- SVN_ERR(svn_fs_fs__revision_proplist(&proplist, fs, rev, iterpool));
- SVN_ERR(svn_sqlite__bind_int64(stmt, 1, rev));
- SVN_ERR(svn_sqlite__bind_properties(stmt, 2, proplist, pool));
- SVN_ERR(svn_sqlite__insert(NULL, stmt));
- }
-
- /* Update the min-unpacked-revprop file to reflect our newly packed shard.
- * (This doesn't update ffd->min_unpacked_revprop.) */
- SVN_ERR(write_revnum_file(fs_path, PATH_MIN_UNPACKED_REVPROP,
- (svn_revnum_t)((shard + 1) * max_files_per_dir),
- iterpool));
- svn_pool_destroy(iterpool);
-
- /* Finally, remove the existing shard directory. */
- SVN_ERR(svn_io_remove_dir2(shard_path, TRUE, cancel_func, cancel_baton,
- pool));
-
- /* Notify caller we're starting to pack this shard. */
- if (notify_func)
- SVN_ERR(notify_func(notify_baton, shard, svn_fs_pack_notify_end_revprop,
- pool));
-
- return SVN_NO_ERROR;
-}
-
struct pack_baton
{
svn_fs_t *fs;
@@ -7939,7 +7714,6 @@ pack_body(void *baton,
apr_pool_t *iterpool;
const char *data_path, *revprops_path;
svn_revnum_t min_unpacked_rev;
- svn_revnum_t min_unpacked_revprop;
SVN_ERR(read_format(&format, &max_files_per_dir, path_format(pb->fs, pool),
pool));
@@ -7960,23 +7734,11 @@ pack_body(void *baton,
path_min_unpacked_rev(pb->fs, pool),
pool));
- if (format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
- {
- SVN_ERR(read_min_unpacked_rev(&min_unpacked_revprop,
- path_min_unpacked_revprop(pb->fs, pool),
- pool));
- }
- else
- {
- min_unpacked_revprop = 0;
- }
-
SVN_ERR(get_youngest(&youngest, pb->fs->path, pool));
completed_shards = (youngest + 1) / max_files_per_dir;
/* See if we've already completed all possible shards thus far. */
- if (min_unpacked_rev == (completed_shards * max_files_per_dir) &&
- min_unpacked_revprop == (completed_shards * max_files_per_dir))
+ if (min_unpacked_rev == (completed_shards * max_files_per_dir))
return SVN_NO_ERROR;
data_path = svn_dirent_join(pb->fs->path, PATH_REVS_DIR, pool);
@@ -7995,21 +7757,6 @@ pack_body(void *baton,
pb->cancel_func, pb->cancel_baton, iterpool));
}
- if (format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
- for (i = min_unpacked_revprop / max_files_per_dir; i < completed_shards; i++)
- {
- svn_pool_clear(iterpool);
-
- if (pb->cancel_func)
- SVN_ERR(pb->cancel_func(pb->cancel_baton));
-
- SVN_ERR(pack_revprop_shard(pb->fs,
- revprops_path, pb->fs->path, i,
- max_files_per_dir,
- pb->notify_func, pb->notify_baton,
- pb->cancel_func, pb->cancel_baton, iterpool));
- }
-
svn_pool_destroy(iterpool);
return SVN_NO_ERROR;
}
Propchange: subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 8 23:23:27 2011
@@ -1,2 +1,2 @@
-/subversion/branches/revprop-packing/subversion/libsvn_fs_fs/temp_serializer.c:1143971,1144017
+/subversion/branches/revprop-packing/subversion/libsvn_fs_fs/temp_serializer.c:1143907,1143971,1144017
/subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c:1067687-1072301
Propchange: subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 8 23:23:27 2011
@@ -1,2 +1,2 @@
-/subversion/branches/revprop-packing/subversion/libsvn_fs_fs/temp_serializer.h:1143971,1144017
+/subversion/branches/revprop-packing/subversion/libsvn_fs_fs/temp_serializer.h:1143907,1143971,1144017
/subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.h:1067687-1072301
Propchange: subversion/trunk/subversion/libsvn_subr/adler32.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 8 23:23:27 2011
@@ -1,4 +1,4 @@
/subversion/branches/diff-optimizations/subversion/libsvn_subr/adler32.c:1031270-1037352
/subversion/branches/diff-optimizations-bytes/subversion/libsvn_subr/adler32.c:1037353-1067789
/subversion/branches/performance/subversion/libsvn_subr/adler32.c:1067697-1078365
-/subversion/branches/revprop-packing/subversion/libsvn_subr/adler32.c:1143971,1144017
+/subversion/branches/revprop-packing/subversion/libsvn_subr/adler32.c:1143907,1143971,1144017
Propchange: subversion/trunk/subversion/libsvn_subr/svn_temp_serializer.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 8 23:23:27 2011
@@ -1,2 +1,2 @@
-/subversion/branches/revprop-packing/subversion/libsvn_subr/svn_temp_serializer.c:1143971,1144017
+/subversion/branches/revprop-packing/subversion/libsvn_subr/svn_temp_serializer.c:1143907,1143971,1144017
/subversion/trunk/subversion/libsvn_subr/svn_temp_serializer.c:1067687-1072301