Return-Path: X-Original-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-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 8664310201 for ; Tue, 15 Oct 2013 15:10:24 +0000 (UTC) Received: (qmail 11560 invoked by uid 500); 15 Oct 2013 15:10:23 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 11525 invoked by uid 500); 15 Oct 2013 15:10:22 -0000 Mailing-List: contact oak-dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-dev@jackrabbit.apache.org Received: (qmail 11516 invoked by uid 99); 15 Oct 2013 15:10:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Oct 2013 15:10:21 +0000 X-ASF-Spam-Status: No, hits=-1.3 required=5.0 tests=FRT_ADOBE2,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [64.18.1.29] (HELO exprod6og112.obsmtp.com) (64.18.1.29) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Oct 2013 15:10:13 +0000 Received: from outbound-smtp-1.corp.adobe.com ([192.150.11.134]) by exprod6ob112.postini.com ([64.18.5.12]) with SMTP ID DSNKUl1awHDJ87/Ys9ZZ/lEiSH1EaWi1Nzz8@postini.com; Tue, 15 Oct 2013 08:09:53 PDT Received: from inner-relay-2.corp.adobe.com ([153.32.1.52]) by outbound-smtp-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id r9FF6DiH027726 for ; Tue, 15 Oct 2013 08:06:13 -0700 (PDT) Received: from nacas03.corp.adobe.com (nacas03.corp.adobe.com [10.8.189.121]) by inner-relay-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id r9FF9qOU015464 for ; Tue, 15 Oct 2013 08:09:52 -0700 (PDT) Received: from SJ1GWM333.corp.adobe.com (10.5.79.98) by nacas03.corp.adobe.com (10.8.189.121) with Microsoft SMTP Server (TLS) id 8.3.327.1; Tue, 15 Oct 2013 08:09:52 -0700 Received: from eurcas01.eur.adobe.com (10.128.4.27) by SJ1GWM333.corp.adobe.com (10.5.79.98) with Microsoft SMTP Server (TLS) id 14.3.158.1; Tue, 15 Oct 2013 08:09:52 -0700 Received: from [10.132.1.214] (10.132.1.214) by eurcas01.eur.adobe.com (10.128.4.111) with Microsoft SMTP Server id 8.3.327.1; Tue, 15 Oct 2013 16:09:49 +0100 Message-ID: <525D5ACD.7010503@apache.org> Date: Tue, 15 Oct 2013 17:10:05 +0200 From: =?ISO-8859-1?Q?Michael_D=FCrig?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Subject: Re: CommitHook not detecting new items References: In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, On 15.10.13 4:44 , Angela Schreiber wrote: > hi > > quick follow up: i just had a private discussion with michael in > the office and he added that this is related to what we are > struggling with when it comes to move in general and to move > in combination with permissions. It is related in the sense that we are "only" seeing a consolidated view of changes instead of the detailed sequence of operations that led here. > > while moving non-referenceable nodes actually can be considered > a deletion plus subsequent add as the node is no longer the 'same' > in our oak setup (not every single node has an unique identifier > as it was the case in jackrabbit-core), we definitely should take > a second look at the move of referenceable nodes. We can actually use this as an explanation (more like an excuse, that is ;-) ) for why there are no NODE_MOVED events. However, as Angela mentions the situation is different for nodes that have a more stable identifier than its path (i.e. referenceable nodes). Here we could detect move operations as the identity of such nodes does not change across moves. This would allow us to correctly handle permission evaluation and to generate NODE_MOVED events for moved nodes that are referenceable. Not sure whether its worth the additional complexity though. Michael > > wdyt, would this be a reasonable topic to look at and discuss for > our october oakathon next week? > > kind regards > angela > > > On 10/15/13 3:45 PM, "Angela Schreiber" wrote: > >> hi all >> >> once again i found myself struggling with the way the commit hooks >> identify new items. in the example test below there is in fact a >> new node being created. >> >> nevertheless the commit hook (in this case the VersionablePathHook) >> will not see a new jcr:versionhistory property but only the modification >> of an existing one... which is at least a bit confusing as this >> protected property can't be modified and there was in fact a new >> node created which get's a new version history, a new uuid and so forth. >> >>> @Test >>> public void testVersionableChildNode2() throws Exception { >>> Node testNode = >>> superuser.getNode(path).addNode("n1").addNode("n2").addNode("n3").addNode >>> ( >>> " >>> jcr:content"); >>> testNode.addMixin("mix:versionable"); >>> superuser.save(); >>> >>> >>> testNode.remove(); >>> testNode = >>> superuser.getNode(path).getNode("n1").getNode("n2").getNode("n3").addNode >>> ( >>> " >>> jcr:content"); >>> testNode.addMixin("mix:versionable"); >>> superuser.save(); // does NOT trigger >>> VersionablePathHook#propertyAdded >>> >>> assertTrue(testNode.isNodeType("mix:versionable")); >>> VersionHistory vh = testNode.getVersionHistory(); >>> Property versionablePath = >>> vh.getProperty(superuser.getWorkspace().getName()); // FAILS with >>> PathNotFoundException! >>> assertEquals(testNode.getPath(), versionablePath.getString()); >>> } >> >> i can work around this by looking for modified jcr:versionHistory >> properties. >> but to be honest this looks quite wrong to me :-) >> >> kind regards >> angela >> >