From commits-return-48609-archive-asf-public=cust-asf.ponee.io@subversion.apache.org Thu Mar 15 22:59:00 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 53EA9180649 for ; Thu, 15 Mar 2018 22:59:00 +0100 (CET) Received: (qmail 38868 invoked by uid 500); 15 Mar 2018 21:58:59 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 38858 invoked by uid 99); 15 Mar 2018 21:58:59 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Mar 2018 21:58:59 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 8301D3A0098 for ; Thu, 15 Mar 2018 21:58:58 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@subversion.apache.org From: philip@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20180315215858.8301D3A0098@svn01-us-west.apache.org> 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"""