Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 5430 invoked from network); 23 Jul 2007 19:55:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Jul 2007 19:55:23 -0000 Received: (qmail 56514 invoked by uid 500); 23 Jul 2007 19:55:23 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 56500 invoked by uid 500); 23 Jul 2007 19:55:22 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 56490 invoked by uid 99); 23 Jul 2007 19:55:22 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jul 2007 12:55:22 -0700 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (herse.apache.org: transitioning domain of ivan@yourmail.com does not designate 68.142.225.204 as permitted sender) Received: from [68.142.225.204] (HELO smtp106.rog.mail.re2.yahoo.com) (68.142.225.204) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 23 Jul 2007 12:55:19 -0700 Received: (qmail 25961 invoked from network); 23 Jul 2007 19:54:58 -0000 Received: from unknown (HELO ?10.0.0.135?) (ilatysh@rogers.com@207.54.126.253 with plain) by smtp106.rog.mail.re2.yahoo.com with SMTP; 23 Jul 2007 19:54:57 -0000 X-YMail-OSG: 7SjwP0YVM1lfBQ5o_iKYT8CcGks6Pnb2A6KZsR3ZjVWZ2OzZiqGmf2CcO4s58jMBDw-- Message-ID: <46A5062B.4060500@yourmail.com> Date: Mon, 23 Jul 2007 15:48:59 -0400 From: IvanLatysh Organization: Assent Marketing Inc. User-Agent: Thunderbird 2.0.0.5 (Windows/20070716) MIME-Version: 1.0 To: users@jackrabbit.apache.org Subject: Re: Isolation level inconsistency. References: <469F8942.70403@yourmail.com> <1b0d43d00707220747h4f1b0631x8f9544f8c0c83d73@mail.gmail.com> <46A39841.9000204@yourmail.com> <46A39AE9.4000902@gmx.de> <46A41CEE.8090601@yourmail.com> <46A500A5.4090902@gmx.net> In-Reply-To: <46A500A5.4090902@gmx.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Marcel Reutegger wrote: > I agree with you that this not intuitive but returning a node with the > persistent state is IMO worse. > > Let say you have a node A. Then you set property p which gives you A' > (the transiently modified A). Then you query the workspace for nodes > with property p and the value you just set. The query would then return > node A. Now you modify that very same node instance and set property q > to another value. Will this result in A''? What happens to A'? What > happens if you call refresh() on A'' will it also refresh A'? What will > be persisted if you call Session.save(), A' or A'' or modifications from > both? Assuming it were possible that you *can* save just A', does a save > on A'' throw a InvalidItemStateException? If I had the time I could > probably go one for minutes and write down more of those tricky questions. If I understood you correctly: 1) query repository for node with property P=steve 2) got node A with property P=steve 3) set node A property P=john (making it transient) 4) query repository for node with property P=john 5) got node A (transient) with property P=john 6) set property Q=test What you missed is that every time query will return the same transient state, so no A' and A'' will ever exist, and node A persisted with all changes. If query return persistent state only you will see a bit different behavior. 1) query repo for node with property P=steve 2) got node A with property P=steve 3) set node A property P=john (making it transient) 4) query repository for node with property P=john 5) got nothing 6) query repo for node with property P=steve 7) got node A' (since A is a transient at this moment) with property P=steve > However there is one thing I never really paid attention to so far: > while the method QueryResult.getNodes() returns items that reflect the > transient changes of the session, QueryResult.getRows() does not have to > and probably should not reflect transient changes. I think the current > spec does not really mention whether values of transient properties or > persisted properties are returned. Since a JCR Row does not return JCR > Items but only JCR Values which are not attached to Items the Row should > return the values of the persistent properties. This is currently not > the case in Jackrabbit. But as mentioned before it is not clearly > specified. Thank you for pointing it out. It is one more reason to make sure that isolation level *must* be defined in the spec and impl. should obey it. -- Ivan Latysh ivan@yourmail.com