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 DA18C18D1A for ; Sun, 4 Oct 2015 14:29:06 +0000 (UTC) Received: (qmail 68814 invoked by uid 500); 4 Oct 2015 14:29:06 -0000 Delivered-To: apmail-subversion-dev-archive@subversion.apache.org Received: (qmail 68761 invoked by uid 500); 4 Oct 2015 14:29:06 -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 68741 invoked by uid 99); 4 Oct 2015 14:29:05 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Oct 2015 14:29:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 6E7CCC1FB8 for ; Sun, 4 Oct 2015 14:29:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-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: spamd1-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=visualsvn.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id kqzqrO_QMu1K for ; Sun, 4 Oct 2015 14:28:57 +0000 (UTC) Received: from mail-io0-f170.google.com (mail-io0-f170.google.com [209.85.223.170]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id DBD2420513 for ; Sun, 4 Oct 2015 14:28:56 +0000 (UTC) Received: by ioii196 with SMTP id i196so162066097ioi.3 for ; Sun, 04 Oct 2015 07:28:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=visualsvn.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=fqgwPpLnlNlIlR8F0IHNa63RsEnuzy0xqzltPafxBE0=; b=QvRQyKnThzt771I5IVUrNOAf/SUvovtVC60uOT4zbEbZcZVFruW7FT/SwPDad2Hm/I KHI3QFNbgdV5YNjUkPzabw4DOmXoQY7k0MOGE2cfqVidPsIGh6Gm/IhiZ84Wcy+k5EqF Ylw0MAhLSFijopAm1QSS2dDo9HwJ2UYPybXMU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=fqgwPpLnlNlIlR8F0IHNa63RsEnuzy0xqzltPafxBE0=; b=OD4fbEGKrrWcrd+kMqHOJt99GP3mCWe997+p+XXMjY6fPN9HguTzU374EamCQ8iJ1n UaXIegixqenudj41LPS8UILdqu8RR7ZGuppX3VClCjIf5kaGFCvVGtEte7MTRC9AYNHo zy6UTZh930FmO6P3dtOK0ulAnnbMRtnWLZaD8EMMznxB7P2AyYx0Bkk+AtuDjLi8ClI3 smJs4EYQhprkIyZTRTe75LVwlTy/mFbFpK8jduIWs2NWr2GbjgjLzqTZBCsKaWrRzScC ddLACI9sxuf4RX1xZC9taHXnksuInHcxZpToEK4fJ6Ca0Oijdgy5K9Pnv5VH5WM9lfru ocKw== X-Gm-Message-State: ALoCoQne2ixXIYb0nK6s5LDym6nloy1PZnFHjLlbtuqXOA2CcEncTRmiqa+qcU0FfmRSL6/iFSpZ X-Received: by 10.107.130.84 with SMTP id e81mr29040800iod.77.1443968936219; Sun, 04 Oct 2015 07:28:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.119.165 with HTTP; Sun, 4 Oct 2015 07:28:36 -0700 (PDT) In-Reply-To: References: <20150921210118.GF1955@tarsus.local2> <5602746B.9050800@apache.org> <56027A52.1090806@apache.org> From: Evgeny Kotkov Date: Sun, 4 Oct 2015 17:28:36 +0300 Message-ID: Subject: Re: No-op changes no longer dumped by 'svnadmin dump' in 1.9 To: Stefan Fuhrmann Cc: Julian Foad , =?UTF-8?Q?Branko_=C4=8Cibej?= , Johan Corveleyn , dev Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Stefan Fuhrmann writes: > Right now, we are losing information. In rare cases and probably nothing = too > important but still. This aspect makes me consider the current behaviour = a > bug. Whether creating that situation in the first place was o.k. nor not = is > a separate issue. To my mind, the current behavior is a regression, because: - svnadmin dump produces different dumps for the same repository, depending on the version (1.8 or 1.9) - svnadmin dump and svnrdump dump in 1.9 produce different dumps for the same repository - After a dump-load sequence with svnadmin from 1.9, the resulting reposito= ry behaves differently from the original in operations like 'svn log' I committed a failing test in r1706428, and I also think that we have quite a problem to solve =E2=80=94 see below. [...] > I suggest that we apply the patch below. It is more efficient that the > original behaviour but ensures that "no-op" changes will be retained. [...] > V2 of the patch also covers no-op prop changes to directories. Although the V2 patch seems to mitigate the problem in one particular case, it does not solve it generally. For instance, here is another scenario whe= re 1.8 and 1.9 binaries produce different dumps, even with the patch applied: svnmucc cp 1 bar baz put empty-file baz Node-copyfrom-path: bar Text-copy-source-md5: d41d8cd98f00b204e9800998ecf8427e Text-copy-source-sha1: da39a3ee5e6b4b0d3255bfef95601890afd80709 -Text-content-length: 0 -Text-content-md5: d41d8cd98f00b204e9800998ecf8427e -Text-content-sha1: da39a3ee5e6b4b0d3255bfef95601890afd80709 -Content-length: 0 I examined the history of fixing problems caused by r1572363 + r1573111, an= d this is the second time when we find ourselves whack-a-moling the calling s= ites of svn_fs_props_different() and svn_fs_contents_different(). Previously, w= e had issues with misbehaving 'svn blame -g' [1]. This ended up with placing a hack in subversion/libsvn_repos/rev_hunt.c, and with rather questionable compatibility promises for svn_ra_get_file_revs2(): [[[ else if (sb->include_merged_revisions && strcmp(sb->last_path, path_rev->path)) { /* ### This is a HACK!!! * Blame -g, in older clients anyways, relies on getting a notificati= on * whenever the path changes - even if there was no content change. * * TODO: A future release should take an extra parameter and dependin= g * on that either always send a text delta or only send it if there * is a difference. */ contents_changed =3D TRUE; } ... * @note Prior to Subversion 1.9, this function may request delta handlers * from @a handler even for empty text deltas. Starting with 1.9, the * delta handler / baton return arguments passed to @a handler will be * #NULL unless there is an actual difference in the file contents between * the current and the previous call. * * @since New in 1.5. */ svn_error_t * svn_ra_get_file_revs2(svn_ra_session_t *session, const char *path, ... ]]] The r1572363 + r1573111 patchset implicitly changes behavior of around six different callers, and two of them have already backfired with problems. Moreover, apart from switching everything to the new API, these revisions change the behavior of *existing* API like svn_fs_contents_changed(). We have an erratum describing the change [2], but I doubt that API users can properly adjust their code, if they notice this change =E2=80=94 because ev= en we failed to do so. Finally, I cannot understand the practical benefits from doing this. If th= ese changes are aimed at making the checks more strict, but break existing code= , I don't think we should be doing this. If this is an optimization, I'd fav= or correctness over it. I propose that, instead of patching the callers in response to problems, we restore every relevant part to its 1.8.x state, where they're known to be s= table and work. This would allow us to remove the hacks like the one associated = with fixing svn blame -g, would restore the proper behavior of svnadmin dump, an= d would also allow us not to deal with similar problems in other places, if t= hey exist. How does this sound? [1] http://svn.haxx.se/dev/archive-2015-06/0069.shtml [2] http://svn.apache.org/repos/asf/subversion/trunk/notes/api-errata/1.9/f= s001.txt Regards, Evgeny Kotkov