You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2011/12/17 12:36:20 UTC
svn commit: r1215463 - in
/subversion/branches/file-handle-cache/subversion/libsvn_fs_fs: fs.h fs_fs.c
Author: stefan2
Date: Sat Dec 17 11:36:20 2011
New Revision: 1215463
URL: http://svn.apache.org/viewvc?rev=1215463&view=rev
Log:
On file_handle_cache branch:
Fix merge artifact that made the fs pack test segfault. There is no
packed_rev_root_id_cache anymore.
* subversion/libsvn_fs_fs/fs.h
(fs_fs_data_t): remove packed_rev_root_id_cache (unused)
* subversion/libsvn_fs_fs/fs_fs.c
(svn_fs_fs__rev_get_root): use rev_root_id_cache (as on /trunk)
Modified:
subversion/branches/file-handle-cache/subversion/libsvn_fs_fs/fs.h
subversion/branches/file-handle-cache/subversion/libsvn_fs_fs/fs_fs.c
Modified: subversion/branches/file-handle-cache/subversion/libsvn_fs_fs/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/file-handle-cache/subversion/libsvn_fs_fs/fs.h?rev=1215463&r1=1215462&r2=1215463&view=diff
==============================================================================
--- subversion/branches/file-handle-cache/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/branches/file-handle-cache/subversion/libsvn_fs_fs/fs.h Sat Dec 17 11:36:20 2011
@@ -227,10 +227,6 @@ typedef struct fs_fs_data_t
that the transition from non-packed to packed is irreversable. */
svn_cache__t *rev_root_id_cache;
- /* Similar to @ref rev_root_id_cache but all IDs are guaranteed
- to belong to packed revisions. */
- svn_cache__t *packed_rev_root_id_cache;
-
/* DAG node cache for immutable nodes */
svn_cache__t *rev_node_cache;
Modified: subversion/branches/file-handle-cache/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/file-handle-cache/subversion/libsvn_fs_fs/fs_fs.c?rev=1215463&r1=1215462&r2=1215463&view=diff
==============================================================================
--- subversion/branches/file-handle-cache/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/file-handle-cache/subversion/libsvn_fs_fs/fs_fs.c Sat Dec 17 11:36:20 2011
@@ -2917,21 +2917,13 @@ svn_fs_fs__rev_get_root(svn_fs_id_t **ro
svn_file_handle_cache__handle_t *revision_file;
apr_file_t *apr_rev_file;
apr_off_t root_offset;
- svn_cache__t *cache = NULL;
svn_fs_id_t *root_id = NULL;
svn_boolean_t is_cached;
SVN_ERR(ensure_revision_exists(fs, rev, pool));
- /* Try to find the ID in our caches. Once we tried is_packed_rev
- returned true, we will never try to use the cache for non-packed
- revs again. Also, if we find the entry in the cache, this
- function cannot be racy because we don't need to access the file. */
- cache = is_packed_rev(fs, rev)
- ? ffd->packed_rev_root_id_cache
- : ffd->rev_root_id_cache;
SVN_ERR(svn_cache__get((void **) root_id_p, &is_cached,
- cache, &rev, pool));
+ ffd->rev_root_id_cache, &rev, pool));
if (is_cached)
return SVN_NO_ERROR;
@@ -2949,10 +2941,7 @@ svn_fs_fs__rev_get_root(svn_fs_id_t **ro
SVN_ERR(svn_file_handle_cache__close(revision_file));
- /* At this point, the revision might have already gotten packed
- but cache is still the one for non-packed IDs. In that case,
- it will never be looked up here, again. So, we are safe. */
- SVN_ERR(svn_cache__set(cache, &rev, root_id, pool));
+ SVN_ERR(svn_cache__set(ffd->rev_root_id_cache, &rev, root_id, pool));
*root_id_p = root_id;