Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 46334 invoked from network); 20 Nov 2009 09:47:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 Nov 2009 09:47:01 -0000 Received: (qmail 38037 invoked by uid 500); 20 Nov 2009 09:47:01 -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 38027 invoked by uid 99); 20 Nov 2009 09:47:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Nov 2009 09:47:01 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [195.243.100.246] (HELO mail.versant.net) (195.243.100.246) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Nov 2009 09:46:50 +0000 Received: from nali.versant.com ([192.168.10.54]:4117 helo=hamburg1.versant.com) by mail.versant.net with esmtp (Exim 4.69) (envelope-from ) id 1NBQ4K-0002ad-3D; Fri, 20 Nov 2009 10:46:21 +0100 In-Reply-To: <4B025944.8070906@spree.de> References: <4B025944.8070906@spree.de> Subject: Re: query timeout in JDO X-KeepSent: 8615DF3B:798BC90E-C1257674:00314FA9; type=4; name=$KeepSent To: Michael Bouschen Cc: Apache JDO project , JDO Expert Group X-Mailer: Lotus Notes Release 8.5 December 05, 2008 Message-ID: From: CErnst@versant.com Date: Fri, 20 Nov 2009 10:46:20 +0100 X-MIMETrack: Serialize by Router on hamburg1/SERVER/VERSANT(Release 8.5|December 05, 2008) at 20.11.2009 10:46:20 MIME-Version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi ! Michael Bouschen wrote on 17.11.2009 09:05:24: > query timeout in JDO > > Hi, > > the current spec allows specifying a query timeout on a Query, a PM > or a PMF. The PM defines the default for all Query instances of the > PM and the PMF defines the default value for all PMs of that PMF. > However, there are still three open issue in the query timeout area: > > (1) query timeout as an optional feature > I propose to add query timeout as an optional feature. This means > the collection returned by the PMF method supportedOptions includes > the string "javax.jdo.option.QueryTimeout", if the JDO > implementation and the datastore bound to the PMF supports query > timeout. This would be a change in chapter 11.6 "Optional Feature > Support" of the spec. Sounds fine as there might exists datastores which doesn't support thes= e feature. > (2) Scope of the query timeout value > I propose that a query timeout value set for a PM applies to all > "datastore query" operations issued by the PM. This includes > relationship navigation, findByObjectId and lasy loading of collectio= ns. > But how about modifying operations such as update, delete and > insert? Does it make sense to apply the PM's query timeout for these > operationsas well? I think this makes sense, but it might be less > obvious, because these operations are part of the transaction > commit. See also J=F6rg's recent email with subject "update timeout".= > This would be a change in chapter 12 PersistenceManager. Today > chapter 12.6.3 "Query factory interface" specifies method > setQueryTimeout. If we broaden the scope of a query timeout set on a > PM, it might make sense to specify this in its own section, e.g. 12. > 6.9 "Query Timeout". The "Query Timeout" shall be an option only for the JDO queries themsel= f. Keep in mind that the idea of JDO was to support any kind of datastore,= which means there exists implementations which don't use any kind of datastore queries for operations like relationship navigation, findByObjectId and lasy loading of collections. > (3) Definition of query timeout: datastore operation or JDO method? > Does the query timeout apply to the underlying datastore operation > or does it define the maximum execution time of the JDO method such > as Query.execute? > I propose the former, meaning use the query timeout value for the > datastore operation. Otherwise, the JDO implementation would need to > calculate the timeout for the datastore operation and need o guess > the time needed to post-process the query result. If the datastore > has the JDBC standard second resolution, and there is less than 1000 > millis left in the timeout, what should be the timeout set on the > datastore query statement? >From the JDO idea it should be on the operation of the Query.execute(), but from a Vendor persective i would suggest that we allow both and it shouldn't be gurantied that this value is exact, as the underlying datastore might have some kind of tolerance for the timeout or has different resolution for there timer. cheers Christian --- Christian Ernst Software Engineer Tel: +49-40-60990 338 Fax: +49-40-60990 113 EMail: cernst@versant.com Versant GmbH Wiesenkamp 22b 22359 Hamburg Germany Think Outside the Grid! http://www.versant.com Versant GmbH is incorporated in Germany. Company registration number: HRB 54723, Amtsgericht Hamburg. Registered Office: Wiesenkamp 22b, 22359 Hamburg, Germany. Gesch=E4ftsf=FChrer: Jochen Witte=