Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 78374 invoked from network); 29 Apr 2009 09:13:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Apr 2009 09:13:48 -0000 Received: (qmail 12029 invoked by uid 500); 29 Apr 2009 09:13:48 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 11982 invoked by uid 500); 29 Apr 2009 09:13:47 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 11974 invoked by uid 99); 29 Apr 2009 09:13:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Apr 2009 09:13:47 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Apr 2009 09:13:39 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Lz5qw-0008HO-Ns for dev@jackrabbit.apache.org; Wed, 29 Apr 2009 02:13:18 -0700 Message-ID: <23293466.post@talk.nabble.com> Date: Wed, 29 Apr 2009 02:13:18 -0700 (PDT) From: Yoav Landman To: dev@jackrabbit.apache.org Subject: Re: Understanding mixins merge logic In-Reply-To: <90a8d1c00904290133g3e23fe17h8fdb64544ed3b2fd@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: ylandman@gmail.com References: <23267598.post@talk.nabble.com> <923C3657-7986-432A-A2AE-697724108524@gmail.com> <90a8d1c00904290133g3e23fe17h8fdb64544ed3b2fd@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Missed that new jira somehow. Great - thank you! Yoav Stefan Guggisberg wrote: >=20 > On Tue, Apr 28, 2009 at 2:11 PM, Stefan Guggisberg > wrote: >> Hi yoav, >> >> >> >> On 28.04.2009, at 01:51, Yoav =C2=A0Landman wrote: >> >>> >>> Hi, >>> >>> I am trying to understand the logic of merging mixing changes - >>> I see that the NodeStateMerger is failing a merge due do a difference i= n >>> the >>> mixin type names. In practice, however, the content of the mixin type >>> namesets is identical between the overlayed state and the modified stat= e >>> (same *names* references). But since the comparison of the 2 namesets >>> themselves is done by reference (NameSet does not override equals()) an= d >>> since the *namesets* references are different the merge ends up with a >>> StaleItemStateException. >>> >>> My question is - >>> Shouldn't the comparison of the mixin type sets be done by content, not >>> by >>> the references of the namesets themselves? >> >> Agreed, seems to be a bug. I'll have a look tomorrow and let you know. >=20 > this bug is a regression of [1]. the good news is that it has already bee= n > reported and fixed in trunk, see [2]. >=20 > [1] https://issues.apache.org/jira/browse/JCR-1705 > [2] https://issues.apache.org/jira/browse/JCR-2081 >=20 > cheers > stefan >=20 >> >>> The relevant comments in >>> NodeStateMerger say: >>> "the mixins have been modified but by just looking at the diff we can't >>> determine where the change happened since the diffs of either removing = a >>> mixin from the overlayed or adding a mixin to the transient state would >>> look >>> identical..." >>> I am trying to understand this and how it applies to the current >>> behavior, >>> but can't. Could someone shed some light on it? >> >> I guess the namesets are copied-on-write. The assumption therefore is >> that >> =C2=A0non-equal nameset references mean that they've been modified. I'll= have >> a >> look. >> >> Cheers >> Stefan >> >> >>> >>> >>> Thanks, >>> >>> Yoav >>> -- >>> View this message in context: >>> http://www.nabble.com/Understanding-mixins-merge-logic-tp23267598p23267= 598.html >>> Sent from the Jackrabbit - Dev mailing list archive at Nabble.com. >>> >> >=20 >=20 --=20 View this message in context: http://www.nabble.com/Understanding-mixins-me= rge-logic-tp23267598p23293466.html Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.