Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0620673DE for ; Thu, 1 Dec 2011 10:08:02 +0000 (UTC) Received: (qmail 22197 invoked by uid 500); 1 Dec 2011 10:08:01 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 22167 invoked by uid 500); 1 Dec 2011 10:08:01 -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 22160 invoked by uid 99); 1 Dec 2011 10:08:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2011 10:08:01 +0000 X-ASF-Spam-Status: No, hits=-1.6 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [64.18.1.21] (HELO exprod6og108.obsmtp.com) (64.18.1.21) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2011 10:07:54 +0000 Received: from outbound-smtp-1.corp.adobe.com ([192.150.11.134]) by exprod6ob108.postini.com ([64.18.5.12]) with SMTP ID DSNKTtdR5N2xYDEwKgRYVmZ9EJq8vF/L0Rgp@postini.com; Thu, 01 Dec 2011 02:07:33 PST Received: from inner-relay-1.corp.adobe.com ([153.32.1.51]) by outbound-smtp-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id pB1A5l8G027130 for ; Thu, 1 Dec 2011 02:05:47 -0800 (PST) Received: from nacas01.corp.adobe.com (nacas01.corp.adobe.com [10.8.189.99]) by inner-relay-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id pB1A7VL7010497 for ; Thu, 1 Dec 2011 02:07:31 -0800 (PST) Received: from eurhub01.eur.adobe.com (10.128.4.30) by nacas01.corp.adobe.com (10.8.189.99) with Microsoft SMTP Server (TLS) id 8.3.192.1; Thu, 1 Dec 2011 02:07:31 -0800 Received: from susi.local (10.136.169.98) by eurhub01.eur.adobe.com (10.128.4.111) with Microsoft SMTP Server id 8.3.192.1; Thu, 1 Dec 2011 10:07:25 +0000 Message-ID: <4ED751DC.8070606@apache.org> Date: Thu, 1 Dec 2011 10:07:24 +0000 From: =?ISO-8859-1?Q?Michael_D=FCrig?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Subject: Re: [jr3 microkernel] Write skew References: <4ED63BEE.6010904@apache.org> 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 On 30.11.11 20:53, Jukka Zitting wrote: >> 1) Does visible mean immediately visible on next access or visible after >> refresh? The second case would work with snapshot isolation. > > That's up the implementation. > > Section 10.11.1 of JSR 283 [1] explicitly allows changes to become > visible only after a refresh: "[...] items that do not have changes > pending have their state refreshed to reflect the current persisted > state, thus revealing changes made by other sessions." > > More generally about the write skew -issue; I don't think that's a > common problem in practice. There aren't too many clients that > explicitly interleave operations of multiple sessions within a single > thread. And in a multithreaded setup a client would even with > Jackrabbit 2.x need to use explicit synchronization to enforce more > complex content constraints. Ok, sounds reasonable to me as far as application constraints are involved. Note however, that for the same reason we are currently not able to guarantee node type consistency: session1 = login() session2 = login() n1 = session1.getNode("n") n1.setPrimaryType(nt:file) n1.save() n2 = session2.getNode("n") n2.addNode("foo") n2.save() Both sessions will successfully complete since for each of them the consistency property (nt:file cannot have a child named "foo"). holds. The combined effect however will result in node n being of type nt:file and having a child node foo. We could fix this by implementing Tom's test-and-set operator [1] in the microkernel. Michael [1] http://markmail.org/message/c32jpeoxklgcrybr > > [1] http://www.day.com/specs/jcr/2.0/10_Writing.html#10.11.1%20Refresh > > BR, > > Jukka Zitting