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 F262818CA8 for ; Thu, 26 Nov 2015 18:17:26 +0000 (UTC) Received: (qmail 16949 invoked by uid 500); 26 Nov 2015 18:17:21 -0000 Delivered-To: apmail-subversion-dev-archive@subversion.apache.org Received: (qmail 16893 invoked by uid 500); 26 Nov 2015 18:17:21 -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 16883 invoked by uid 99); 26 Nov 2015 18:17:21 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Nov 2015 18:17:21 +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 1E14E1A234C for ; Thu, 26 Nov 2015 18:17:21 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.7 X-Spam-Level: X-Spam-Status: No, score=0.7 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, KAM_ASCII_DIVIDERS=0.8, 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=wandisco.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 4aHSyAPRDkev for ; Thu, 26 Nov 2015 18:17:12 +0000 (UTC) Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id C80A8428E7 for ; Thu, 26 Nov 2015 18:17:11 +0000 (UTC) Received: by wmec201 with SMTP id c201so41742822wme.0 for ; Thu, 26 Nov 2015 10:17:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wandisco.com; s=gapps; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=LNtLy0i/kUifw4Oduy7MsmOu7E1ZYLtNGEm+zDbpW6k=; b=QL+rIAPFMg1UQiD1Iy/pvvU5GOAzin9a15kydI1pPways62wVLg8hQh92H0gji3PnV X8FRfE7CphAKVXH4Ub8acSJjwnz8JFe80yB9QPX5M+F/ODA93Vuw4Om6eHNvsL2WKeLp wzYCEZGBPlDRLDNoT1CrqyhgONAmrk9TZ8g1k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=LNtLy0i/kUifw4Oduy7MsmOu7E1ZYLtNGEm+zDbpW6k=; b=Nks0sGxQKCZHc4mlxHYbe+8VyU5i1U9nPtopFMW2puyIb0pPhvqAjaCKwVdO3iKzAX v1LBgYRM2NeVnohmkuuaE8Ex1AbfOeL9VsNL5l92E4Qk5bbkFH1NQe3rK7sxoI8yQIYd 4r1SU2o9OT+pAWABzwG9mC9vPxw/l0xSpgjI08VEvocqDl8jXVxd+g922gTX/HswaH8i hxOrc3U4gUKOZJijMikcoAug5RuFxoH1SAjElgDF+/DK+MN0GW7ZrKU01tKoamuLcpmw xDBP0RpEy59tB4ioMUuFcgV+Am7icLGD3yfoZOTZ5W3687migt2rd+CTuKvA/gzr6N4Z pumg== X-Gm-Message-State: ALoCoQmpuXvlQGSviPcyB8ebHS6DUJEqIIpaER2tfP1XAAyZJimvUBgAi1RZU0jf2MQY5ZOYMxqG X-Received: by 10.194.62.14 with SMTP id u14mr47051162wjr.24.1448561830987; Thu, 26 Nov 2015 10:17:10 -0800 (PST) Received: from localhost (cpc81211-farn9-2-0-cust890.6-2.cable.virginm.net. [86.22.207.123]) by smtp.gmail.com with ESMTPSA id w141sm3763775wmw.24.2015.11.26.10.17.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2015 10:17:08 -0800 (PST) From: Philip Martin To: "Bert Huijben" Cc: 'Branko =?utf-8?Q?=C4=8Cibej'?= , Subject: Re: svn commit: r1716548 - /subversion/trunk/subversion/tests/libsvn_fs/fs-test.c References: <20151125213120.9C7FE3A02EE@svn01-us-west.apache.org> <010901d127d0$81dadc60$85909520$@qqmail.nl> <5656395A.60807@apache.org> <011601d127d7$8def30d0$a9cd9270$@qqmail.nl> <87610olvpc.fsf@wandisco.com> Date: Thu, 26 Nov 2015 18:17:07 +0000 In-Reply-To: <87610olvpc.fsf@wandisco.com> (Philip Martin's message of "Thu, 26 Nov 2015 13:46:39 +0000") Message-ID: <871tbclj6k.fsf@wandisco.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Philip Martin writes: > I suppose one way to fix this would be to ensure that every BDB revision > generates a new node-revision-id. To do this we make '/' mutable either when creating the txn, or when commiting the txn. Patches to do both below. Not sure which one is best. Index: subversion/libsvn_fs_base/revs-txns.c =================================================================== --- subversion/libsvn_fs_base/revs-txns.c (revision 1716725) +++ subversion/libsvn_fs_base/revs-txns.c (working copy) @@ -695,6 +695,7 @@ txn_body_begin_txn(void *baton, trail_t *trail) struct begin_txn_args *args = baton; const svn_fs_id_t *root_id; const char *txn_id; + dag_node_t *clone; SVN_ERR(svn_fs_base__rev_get_root(&root_id, trail->fs, args->base_rev, trail, trail->pool)); @@ -751,6 +752,13 @@ txn_body_begin_txn(void *baton, trail_t *trail) SVN_ERR(txn_body_change_txn_prop(&cpargs, trail)); } +#if 0 + /* We want every txn to have a mutable root as then the new revision + will have a distinct root node-revision-id. */ + SVN_ERR(svn_fs_base__dag_clone_root(&clone, trail->fs, txn_id, + trail, trail->pool)); +#endif + *args->txn_p = make_txn(trail->fs, txn_id, args->base_rev, trail->pool); return SVN_NO_ERROR; } Index: subversion/libsvn_fs_base/tree.c =================================================================== --- subversion/libsvn_fs_base/tree.c (revision 1716725) +++ subversion/libsvn_fs_base/tree.c (working copy) @@ -2661,7 +2661,7 @@ txn_body_commit(void *baton, trail_t *trail) svn_revnum_t youngest_rev; const svn_fs_id_t *y_rev_root_id; - dag_node_t *txn_base_root_node; + dag_node_t *txn_base_root_node, *txn_root_node; /* Getting the youngest revision locks the revisions table until this trail is done. */ @@ -2694,6 +2694,19 @@ txn_body_commit(void *baton, trail_t *trail) discovered locks. */ SVN_ERR(verify_locks(txn_name, trail, trail->pool)); +#if 0 + /* We want every txn to have a mutable root as then the new revision + will have a distinct root node-revision-id. */ + SVN_ERR(svn_fs_base__dag_txn_root(&txn_root_node, fs, txn_name, + trail, trail->pool)); + if (!svn_fs_base__dag_check_mutable(txn_root_node, txn->id)) + { + dag_node_t *clone; + SVN_ERR(svn_fs_base__dag_clone_root(&clone, fs, txn->id, + trail, trail->pool)); + } +#endif + /* Else, commit the txn. */ return svn_fs_base__dag_commit_txn(&(args->new_rev), txn, trail, trail->pool); -- Philip Martin WANdisco