subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r1826877 - in /subversion/trunk/subversion: libsvn_fs_fs/cached_data.c libsvn_fs_fs/temp_serializer.h tests/cmdline/svnadmin_tests.py
Date Thu, 15 Mar 2018 21:58:58 GMT
Author: philip
Date: Thu Mar 15 21:58:57 2018
New Revision: 1826877

URL: http://svn.apache.org/viewvc?rev=1826877&view=rev
Log:
Fix issue 4725: zlib error in fsfs cache.  Make the raw window
cache store the svndiff version of the data so that the version
is available when the data is retreived from the cache.

* subversion/libsvn_fs_fs/temp_serializer.h
  (svn_fs_fs__raw_cached_window_t): Add svndiff version member.

* subversion/libsvn_fs_fs/cached_data.c
  (parse_raw_window): Use version retrieved from cache.
  (init_rep_state): Initialize version to the unknown value.
  (cache_windows): Read version, store in cache.

* subversion/tests/cmdline/svnadmin_tests.py
  (load_issue4725): Remove XFail marking.

Modified:
    subversion/trunk/subversion/libsvn_fs_fs/cached_data.c
    subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.h
    subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py

Modified: subversion/trunk/subversion/libsvn_fs_fs/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/cached_data.c?rev=1826877&r1=1826876&r2=1826877&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/cached_data.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/cached_data.c Thu Mar 15 21:58:57 2018
@@ -1268,7 +1268,7 @@ parse_raw_window(void **out,
   stream = svn_stream_from_string(&raw_window, result_pool);
 
   /* parse it */
-  SVN_ERR(svn_txdelta_read_svndiff_window(&result->window, stream, 1,
+  SVN_ERR(svn_txdelta_read_svndiff_window(&result->window, stream, window->ver,
                                           result_pool));
 
   /* complete the window and return it */
@@ -3212,7 +3212,7 @@ init_rep_state(rep_state_t *rs,
   rs->start = entry->offset + rs->header_size;
   rs->current = rep_header->type == svn_fs_fs__rep_plain ? 0 : 4;
   rs->size = entry->size - rep_header->header_size - 7;
-  rs->ver = 1;
+  rs->ver = -1;
   rs->chunk_index = 0;
   rs->raw_window_cache = ffd->raw_window_cache;
   rs->window_cache = ffd->txdelta_window_cache;
@@ -3310,6 +3310,8 @@ cache_windows(svn_fs_t *fs,
           apr_size_t window_len;
           char *buf;
 
+          auto_read_diff_version(rs, iterpool);
+
           /* navigate to the current window */
           SVN_ERR(rs_aligned_seek(rs, NULL, start_offset, iterpool));
           SVN_ERR(svn_txdelta__read_raw_window_len(&window_len,
@@ -3330,6 +3332,7 @@ cache_windows(svn_fs_t *fs,
           window.end_offset = rs->current;
           window.window.len = window_len;
           window.window.data = buf;
+          window.ver = rs->ver;
 
           /* cache the window now */
           SVN_ERR(svn_cache__set(rs->raw_window_cache, &key, &window,

Modified: subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.h?rev=1826877&r1=1826876&r2=1826877&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.h (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.h Thu Mar 15 21:58:57 2018
@@ -60,6 +60,9 @@ typedef struct
 
   /* the offset within the representation right after reading the window */
   apr_off_t end_offset;
+
+  /* svndiff version */
+  int ver;
 } svn_fs_fs__raw_cached_window_t;
 
 /**

Modified: subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py?rev=1826877&r1=1826876&r2=1826877&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py Thu Mar 15 21:58:57 2018
@@ -3802,7 +3802,6 @@ def dump_invalid_filtering_option(sbox):
                                           '--include', '/A/B/E',
                                           sbox.repo_dir)
 
-@XFail(svntest.main.is_fs_type_fsfs)
 @Issue(4725)
 def load_issue4725(sbox):
   """load that triggers issue 4725"""



Mime
View raw message