subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject svn commit: r1639358 - in /subversion/trunk/subversion/libsvn_fs_fs: caching.c fs.h revprops.c
Date Thu, 13 Nov 2014 15:12:12 GMT
Author: ivan
Date: Thu Nov 13 15:12:12 2014
New Revision: 1639358

URL: http://svn.apache.org/r1639358
Log:
Follow-up to r1634880: Cleanup unused revision properties caching code.

* subversion/libsvn_fs_fs/caching.c
  (read_config): Remove CACHE_REVPROPS output parameter - it was always 
   initalized to FALSE.
  (svn_fs_fs__initialize_caches): Remove revprop cache initialization.

* subversion/libsvn_fs_fs/fs.h
  (fs_fs_data_t): Remove REVPROP_CACHE member.

* subversion/libsvn_fs_fs/revprops.c
  (has_revprop_cache): Remove unused function.
  (switch_to_new_revprop): Remove unused argument BUMP_GENERATION.
  (parse_revprop, svn_fs_fs__set_revision_proplist): Remove unused code.

Modified:
    subversion/trunk/subversion/libsvn_fs_fs/caching.c
    subversion/trunk/subversion/libsvn_fs_fs/fs.h
    subversion/trunk/subversion/libsvn_fs_fs/revprops.c

Modified: subversion/trunk/subversion/libsvn_fs_fs/caching.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/caching.c?rev=1639358&r1=1639357&r2=1639358&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/caching.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/caching.c Thu Nov 13 15:12:12 2014
@@ -66,9 +66,8 @@ normalize_key_part(const char *original,
   return normalized->data;
 }
 
-/* *CACHE_TXDELTAS, *CACHE_FULLTEXTS and *CACHE_REVPROPS flags will be set
-   according to FS->CONFIG.  *CACHE_NAMESPACE receives the cache prefix
-   to use.
+/* *CACHE_TXDELTAS, *CACHE_FULLTEXTS flags will be set according to
+   FS->CONFIG.  *CACHE_NAMESPACE receives the cache prefix to use.
 
    Use FS->pool for allocating the memcache and CACHE_NAMESPACE, and POOL
    for temporary allocations. */
@@ -76,7 +75,6 @@ static svn_error_t *
 read_config(const char **cache_namespace,
             svn_boolean_t *cache_txdeltas,
             svn_boolean_t *cache_fulltexts,
-            svn_boolean_t *cache_revprops,
             svn_fs_t *fs,
             apr_pool_t *pool)
 {
@@ -119,10 +117,6 @@ read_config(const char **cache_namespace
                          SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS,
                          TRUE);
 
-  /* For now, always disable revprop caching.
-   */
-  *cache_revprops = FALSE;
-
   return SVN_NO_ERROR;
 }
 
@@ -354,14 +348,12 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
   svn_boolean_t no_handler = ffd->fail_stop;
   svn_boolean_t cache_txdeltas;
   svn_boolean_t cache_fulltexts;
-  svn_boolean_t cache_revprops;
   const char *cache_namespace;
 
   /* Evaluating the cache configuration. */
   SVN_ERR(read_config(&cache_namespace,
                       &cache_txdeltas,
                       &cache_fulltexts,
-                      &cache_revprops,
                       fs,
                       pool));
 
@@ -567,28 +559,6 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
       ffd->mergeinfo_existence_cache = NULL;
     }
 
-  /* if enabled, cache revprops */
-  if (cache_revprops)
-    {
-      SVN_ERR(create_cache(&(ffd->revprop_cache),
-                           NULL,
-                           membuffer,
-                           0, 0, /* Do not use inprocess cache */
-                           svn_fs_fs__serialize_properties,
-                           svn_fs_fs__deserialize_properties,
-                           sizeof(pair_cache_key_t),
-                           apr_pstrcat(pool, prefix, "REVPROP",
-                                       SVN_VA_NULL),
-                           SVN_CACHE__MEMBUFFER_DEFAULT_PRIORITY,
-                           fs,
-                           no_handler,
-                           fs->pool, pool));
-    }
-  else
-    {
-      ffd->revprop_cache = NULL;
-    }
-
   /* if enabled, cache text deltas and their combinations */
   if (cache_txdeltas)
     {

Modified: subversion/trunk/subversion/libsvn_fs_fs/fs.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs.h?rev=1639358&r1=1639357&r2=1639358&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs.h Thu Nov 13 15:12:12 2014
@@ -353,9 +353,6 @@ typedef struct fs_fs_data_t
      rep key (revision/offset) to svn_stringbuf_t. */
   svn_cache__t *fulltext_cache;
 
-  /* Revision property cache.  Maps from (rev,generation) to apr_hash_t. */
-  svn_cache__t *revprop_cache;
-
   /* Node properties cache.  Maps from rep key to apr_hash_t. */
   svn_cache__t *properties_cache;
 

Modified: subversion/trunk/subversion/libsvn_fs_fs/revprops.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/revprops.c?rev=1639358&r1=1639357&r2=1639358&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/revprops.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/revprops.c Thu Nov 13 15:12:12 2014
@@ -135,20 +135,6 @@ svn_fs_fs__upgrade_cleanup_pack_revprops
   return SVN_NO_ERROR;
 }
 
-/* Test whether revprop cache and necessary infrastructure are
-   available in FS. */
-static svn_boolean_t
-has_revprop_cache(svn_fs_t *fs, apr_pool_t *pool)
-{
-  fs_fs_data_t *ffd = fs->fsap_data;
-
-  /* is the cache (still) enabled? */
-  if (ffd->revprop_cache == NULL)
-    return FALSE;
-
-  return FALSE;
-}
-
 /* Container for all data required to access the packed revprop file
  * for a given REVISION.  This structure will be filled incrementally
  * by read_pack_revprops() its sub-routines.
@@ -223,16 +209,6 @@ parse_revprop(apr_hash_t **properties,
   *properties = apr_hash_make(pool);
 
   SVN_ERR(svn_hash_read2(*properties, stream, SVN_HASH_TERMINATOR, pool));
-  if (has_revprop_cache(fs, pool))
-    {
-      fs_fs_data_t *ffd = fs->fsap_data;
-      pair_cache_key_t key = { 0 };
-
-      key.revision = revision;
-      key.second = generation;
-      SVN_ERR(svn_cache__set(ffd->revprop_cache, &key, *properties,
-                             scratch_pool));
-    }
 
   return SVN_NO_ERROR;
 }
@@ -709,7 +685,6 @@ switch_to_new_revprop(svn_fs_t *fs,
                       const char *tmp_path,
                       const char *perms_reference,
                       apr_array_header_t *files_to_delete,
-                      svn_boolean_t bump_generation,
                       apr_pool_t *pool)
 {
   SVN_ERR(svn_fs_fs__move_into_place(tmp_path, final_path, perms_reference,
@@ -1065,7 +1040,6 @@ svn_fs_fs__set_revision_proplist(svn_fs_
                                  apr_pool_t *pool)
 {
   svn_boolean_t is_packed;
-  svn_boolean_t bump_generation = FALSE;
   const char *final_path;
   const char *tmp_path;
   const char *perms_reference;
@@ -1076,24 +1050,6 @@ svn_fs_fs__set_revision_proplist(svn_fs_
   /* this info will not change while we hold the global FS write lock */
   is_packed = svn_fs_fs__is_packed_revprop(fs, rev);
 
-  /* Test whether revprops already exist for this revision.
-   * Only then will we need to bump the revprop generation. */
-  if (has_revprop_cache(fs, pool))
-    {
-      if (is_packed)
-        {
-          bump_generation = TRUE;
-        }
-      else
-        {
-          svn_node_kind_t kind;
-          SVN_ERR(svn_io_check_path(svn_fs_fs__path_revprops(fs, rev, pool),
-                                    &kind,
-                                    pool));
-          bump_generation = kind != svn_node_none;
-        }
-    }
-
   /* Serialize the new revprop data */
   if (is_packed)
     SVN_ERR(write_packed_revprop(&final_path, &tmp_path, &files_to_delete,
@@ -1111,7 +1067,7 @@ svn_fs_fs__set_revision_proplist(svn_fs_
 
   /* Now, switch to the new revprop data. */
   SVN_ERR(switch_to_new_revprop(fs, final_path, tmp_path, perms_reference,
-                                files_to_delete, bump_generation, pool));
+                                files_to_delete, pool));
 
   return SVN_NO_ERROR;
 }



Mime
View raw message