Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 4324 invoked from network); 10 Sep 2008 20:12:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Sep 2008 20:12:45 -0000 Received: (qmail 6948 invoked by uid 500); 10 Sep 2008 20:12:42 -0000 Mailing-List: contact jdo-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-dev@db.apache.org Received: (qmail 6937 invoked by uid 99); 10 Sep 2008 20:12:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Sep 2008 13:12:42 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Sep 2008 20:11:42 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4E6AD234C1D9 for ; Wed, 10 Sep 2008 13:11:44 -0700 (PDT) Message-ID: <950849387.1221077504320.JavaMail.jira@brutus> Date: Wed, 10 Sep 2008 13:11:44 -0700 (PDT) From: "Craig Russell (JIRA)" To: jdo-dev@db.apache.org Subject: [jira] Commented: (JDO-590) Control over transaction isolation level In-Reply-To: <565467833.1207921326033.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JDO-590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12629937#action_12629937 ] Craig Russell commented on JDO-590: ----------------------------------- One more note as I was working on the test cases. I'd like to require that an implementation support at least javax.jdo.option.TransactionIsolationLevel.read-committed. If a datastore doesn't support read-committed isolation level I honestly don't know how it could pass the TCK (or be generally useful). > Control over transaction isolation level > ---------------------------------------- > > Key: JDO-590 > URL: https://issues.apache.org/jira/browse/JDO-590 > Project: JDO > Issue Type: New Feature > Components: api2, api2-legacy, specification, tck2, tck2-legacy > Reporter: Andy Jefferson > Assignee: Craig Russell > Fix For: JDO 2 maintenance release 2 > > Attachments: jdo-590.patch > > > There are 2 sides to this :- > 1). Standardising a mechanism for specifying the transaction isolation level. > This is the primary thing I am referring to, and to do that we need to provide a notional > set of isolation levels - not necessarily just the JDBC set, but that was the > start point as a basis for comment. As mentioned in other docs (see http://www.cs.umb.edu/~poneil/iso.pdf ) > the JDBC set is not complete for our scope, and other totally valid levels should be part of it. In some parts > of the JDO interface (e.g value generation) we define some values, and then > allow implementations to add on their own additional values if not catered > for in the defined list. This is what I would envisage. Suggested levels > NONE, READ_UNCOMMITTED, READ_COMMITTED, NO_LOST_UPDATES, REPEATABLE_READ, SERIALIZABLE > 2). Standardising support for these levels in the JDO implementation, so that > the user is always guaranteed to be able to use what they specify. I'm not > proposing this at all, and see that as unrealistic for an impl to provide > anyway. I simply propose that if an underlying datastore doesn't support the > level specified then we throw an exception, hence the user always knows if > their isolation level is going to be used. This is very much in line with > other parts of the JDO spec where the implementation is free to support some > or all of the valid values. > Obviously, where the underlying datastore supports multiple levels then it > provides value for the user. Similarly where the underlying datastore > supports only a single level then it is something that user would have no > need to change. > jdo-dev mailing list : Christian Romberg wrote > we have to distinguish optimistic and datastore transactions in this discussion, and also what we want to achieve. Personally I think, we want to provide some behaviour guarantees of the API. Unfortunately, this is not the approach used by SQL for defining isolation levels. > So for datastore transactions it simply does not work, because one backend might be a versioning database while another is a non-versioning database, and the behaviour will be totally different, although both guarantee the same isolation level. > On the other hand with JDO optimistic transactions, the behaviour is quite consistent right now (unless flushing is involved), but only a two levels make sense: READ_UNCOMMITTED NO_LOST_UPDATES > all other levels are either unachievable or implicitly overachieved. > However, if we want to provide REPEATABLE_READ, then we could do so in that we implicitly include all read (but not modified) objects in the set of objects checked for modifications at commit time. > Currently a user can do that, by calling "makeTransactional" on read objects. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.