Return-Path: X-Original-To: apmail-subversion-dev-archive@minotaur.apache.org Delivered-To: apmail-subversion-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 56D0318B33 for ; Fri, 25 Sep 2015 12:46:23 +0000 (UTC) Received: (qmail 88648 invoked by uid 500); 25 Sep 2015 12:46:23 -0000 Delivered-To: apmail-subversion-dev-archive@subversion.apache.org Received: (qmail 88598 invoked by uid 500); 25 Sep 2015 12:46:23 -0000 Mailing-List: contact dev-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@subversion.apache.org Received: (qmail 88587 invoked by uid 99); 25 Sep 2015 12:46:22 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Sep 2015 12:46:22 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 5D22B1A0A6A for ; Fri, 25 Sep 2015 12:46:22 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.1 X-Spam-Level: X-Spam-Status: No, score=-0.1 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=btopenworld.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id aDZF02NpDukJ for ; Fri, 25 Sep 2015 12:46:14 +0000 (UTC) Received: from rgout0105.bt.lon5.cpcloud.co.uk (smtpout05.bt.lon5.cpcloud.co.uk [65.20.0.125]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTP id 8D0C8202AB for ; Fri, 25 Sep 2015 12:46:13 +0000 (UTC) X-OWM-Source-IP: 209.85.213.51 (US) X-OWM-Env-Sender: julianfoad@btinternet.com X-CTCH-RefID: str=0001.0A090202.5605420F.0017,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 X-Junkmail-Premium-Raw: score=7/50,refid=2.7.2:2015.9.15.131516:17:7.944,ip=209.85.213.51,rules=__PHISH_SPEAR_HTTP_RECEIVED, __YOUTUBE_RCVD, __MIME_VERSION, __IN_REP_TO, __REFERENCES, __HAS_FROM, __HAS_MSGID, __SANE_MSGID, __BOUNCE_CHALLENGE_SUBJ, __BOUNCE_NDR_SUBJ_EXEMPT, __TO_MALFORMED_2, __CT, __CT_TEXT_PLAIN, CT_TEXT_PLAIN_UTF8_CAPS, __HELO_GMAIL, __ANY_URI, __MAL_TELEKOM_URI, __URI_NO_MAILTO, __URI_NO_WWW, __CP_URI_IN_BODY, __SUBJ_ALPHA_NEGATE, __URI_IN_BODY, __FORWARDED_MSG, BODY_SIZE_3000_3999, __MIME_TEXT_ONLY, __RDNS_GMAIL, __URI_NS, HTML_00_01, HTML_00_10, BODY_SIZE_5000_LESS, WEBMAIL_SOURCE, __PHISH_SPEAR_STRUCTURE_1, __PHISH_SPEAR_STRUCTURE_2, BODY_SIZE_7000_LESS, __SINGLE_URI_TEXT, REFERENCES, NO_URI_HTTPS, SINGLE_URI_IN_BODY, __DQ_NEG_IP, __DQ_NEG_HEUR X-CTCH-Spam: Unknown Received: from mail-vk0-f51.google.com (209.85.213.51) by rgout01.bt.lon5.cpcloud.co.uk (8.6.122.06) (authenticated as julianfoad@btopenworld.com) id 55F31B5F01370FDB for dev@subversion.apache.org; Fri, 25 Sep 2015 13:46:07 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=btopenworld.com; s=btcpcloud; t=1443185173; bh=Jd457U3NrUO+3J/eurmpMmV6alD5JkTBZeshJcnoOYU=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject:To; b=uzwTyTVw4cmZSJEd9u6mMUfHhuNUW7QLpCEXrXnIX1KXpVXIWncn9XJtvbmb6RVWkDPvDcDpfoM46ULL+4oplOM8Py2cO8Z8Vf/R2rdD3gsrLLChKpHNKVDXoY0z7RmtdyxQqrMgXxEnJhHbrJE8LuVE9lORGR9Rdtd5rn79z/8= Received: by vkao3 with SMTP id o3so55163756vka.2 for ; Fri, 25 Sep 2015 05:45:45 -0700 (PDT) X-Received: by 10.31.132.201 with SMTP id g192mr3117736vkd.40.1443185145923; Fri, 25 Sep 2015 05:45:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.41.8 with HTTP; Fri, 25 Sep 2015 05:45:26 -0700 (PDT) In-Reply-To: References: <20150921210118.GF1955@tarsus.local2> <5602746B.9050800@apache.org> <56027A52.1090806@apache.org> From: Julian Foad Date: Fri, 25 Sep 2015 13:45:26 +0100 Message-ID: Subject: Re: No-op changes no longer dumped by 'svnadmin dump' in 1.9 To: dev Content-Type: text/plain; charset=UTF-8 I (Julian Foad) wrote: > Issue #4598 "No-op changes no longer dumped by 'svnadmin dump' in > 1.9", http://subversion.tigris.org/issues/show_bug.cgi?id=4598 > > Added to the release notes in http://svn.apache.org/r1704822 : > file:///home/julianfoad/src/svn-site/publish/docs/release-notes/1.9.html#no-op-changes For one line of attack, I started constructing some test cases to explore the dump behaviour. This is quite a hard direction to start from, because I don't know what internal details may affect the output. For another line of attack, I looked into the source code. The logic in 1.8.x for 'svnadmin dump' is: Write a node record when the appropriate 'revision-replay' function calls the dump editor's open_file() or add_file() method for a file, or its change_dir_prop() method for a dir. The 'revision-replay' function is svn_repos_replay2() in most cases, or svn_repos_dir_delta2() when dumping an initial non-incremental rev. svn_repos_replay2() calls those methods in a manner close to the following pseudo-Python: def svn_repos_replay2(): for (path, change) in svn_fs_paths_changed2(): # via svn_delta_path_driver2() if change.node_kind is 'file': add_file() or open_file() if change.prop_mod: if path is being reported as copied: for pc in svn_prop_diffs(new_props, old_props): change_*_prop(pc.name, pc.value) else: change_*_prop(dummy parameters) # call just once Back to the dumper. Within a node record, output a properties section iff svn_fs_fs__noderev_same_rep_key() returns true for the properties representations, and output a text section iff svn_fs_fs__noderev_same_rep_key() returns true for the text representations. svn_boolean_t svn_fs_fs__noderev_same_rep_key(representation_t *a, representation_t *b) { if (a == b) return TRUE; if (a == NULL || b == NULL) return FALSE; if (a->offset != b->offset) return FALSE; if (a->revision != b->revision) return FALSE; if (a->uniquifier == b->uniquifier) return TRUE; if (a->uniquifier == NULL || b->uniquifier == NULL) return FALSE; return strcmp(a->uniquifier, b->uniquifier) == 0; } (For BDB, svn_fs_base__things_different() calls svn_fs_base__same_keys() to compare the props rep key, text rep key text rep uniquifier.) The function svn_fs_fs__noderev_same_rep_key() does not exist in 1.9.{0...2}, but we could recreate a suitable version of it. (The .uniquifier member has changed form since 1.8.) The FS layer APIs are: svn_fs_contents_changed() svn_fs_props_changed() In 1.9 the implementations of these no longer compare the rep-keys but use a different strategy, implemented in svn_fs_fs__dag_things_different() which returns 'false positive' outputs in fewer and different cases. If our aim is to restore exact compatibility with 1.8 we'll have to be careful to put the exact same logic back. I'll continue examining the code paths. One more issue I notice in svn_fs_fs__dag_things_different() is even in 'strict' mode it reports that two strings are equal if their MD5 checksums are equal. Is this intentional, and is it consistent with the rest of the Subversion system? The test 'compare_contents()' in fs-test.c expects this behaviour, but I wonder if that is an oversight? - Julian