subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1462413 - in /subversion/trunk/subversion: include/svn_fs.h libsvn_fs_fs/fs_fs.c
Date Fri, 29 Mar 2013 06:08:55 GMT
Author: danielsh
Date: Fri Mar 29 06:08:55 2013
New Revision: 1462413

URL: http://svn.apache.org/r1462413
Log:
In the FSFS "paranoid verify" code, disable caching.  See within for a question.

* subversion/include/svn_fs.h
  (SVN_FS_CONFIG_FSFS_CACHE_*): Add a note to maintainers who add such symbols.

* subversion/libsvn_fs_fs/fs_fs.c
  (verify_as_revision_before_current_plus_plus):
    Disable caches the API allows to disable, and add a question.

Modified:
    subversion/trunk/subversion/include/svn_fs.h
    subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c

Modified: subversion/trunk/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_fs.h?rev=1462413&r1=1462412&r2=1462413&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_fs.h (original)
+++ subversion/trunk/subversion/include/svn_fs.h Fri Mar 29 06:08:55 2013
@@ -95,6 +95,9 @@ typedef struct svn_fs_t svn_fs_t;
  */
 #define SVN_FS_CONFIG_FSFS_CACHE_REVPROPS       "fsfs-cache-revprops"
 
+/* Note to maintainers: if you add further SVN_FS_CONFIG_FSFS_CACHE_* knobs,
+   update fs_fs.c:verify_as_revision_before_current_plus_plus(). */
+
 /* See also svn_fs_type(). */
 /** @since New in 1.1. */
 #define SVN_FS_CONFIG_FS_TYPE                   "fs-type"

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=1462413&r1=1462412&r2=1462413&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Fri Mar 29 06:08:55 2013
@@ -8278,11 +8278,20 @@ verify_as_revision_before_current_plus_p
   svn_fs_t *ft; /* fs++ == ft */
   svn_fs_root_t *root;
   fs_fs_data_t *ft_ffd;
+  apr_hash_t *fs_config;
 
   SVN_ERR_ASSERT(ffd->svn_fs_open_);
 
+  fs_config = apr_hash_make(pool);
+  svn_hash_sets(fs_config, SVN_FS_CONFIG_FSFS_CACHE_DELTAS, "0");
+  svn_hash_sets(fs_config, SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS, "0");
+  svn_hash_sets(fs_config, SVN_FS_CONFIG_FSFS_CACHE_REVPROPS, "0");
+  /* ### TODO: are there any other intra-process caches that FS populated
+               and FT will read from?  Can we disable those (for FT at least)?
+   */
+
   SVN_ERR(ffd->svn_fs_open_(&ft, fs->path,
-                            NULL /* ### TODO fs_config */,
+                            fs_config,
                             pool));
   ft_ffd = ft->fsap_data;
 



Mime
View raw message