db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: Update timeout?
Date Mon, 16 Nov 2009 18:55:56 GMT
Hi Jörg,

This is a timely comment. We're just finalizing the query timeout  
issue and we should take care of this item as well for the 2.3 release.

It's possible that we could use the same query timeout value that we  
set on the PersistenceManagerFactory and PersistenceManager to apply  
to both queries and updates/deletes. This would minimize the API  
"footprint" with no loss of expressiveness.

So let's discuss the scope of the query timeout possibly to apply to  
delete and update operations as well.

I agree that it's currently not possible to get access to the  
Statement that is being executed so you can set the timeout in the  
application. It has to be a JDO setting.

Regards,

Craig

On Nov 16, 2009, at 9:27 AM, Joerg von Frantzius wrote:

> Hi,
>
> the other day we had the problem that a row lock got held indefinitely
> in a production database, probably because of the appserver not  
> properly
> committing a connection. As a consequence, the HTTP-threads of the
> appserver got blocked one after the other, during execution of an  
> UPDATE
> statement. This eventually lead to the whole appserver cluster to  
> hang,
> when all HTTP thread pools were filled with blocked threads.
>
> The consequences of a single hanging row-lock could be much less  
> drastic
> if something like an update timeout existed. I was hoping that
> http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Statement.html#setQueryTimeout(int)
> applies to both SELECT and UPDATE statements, so that threads  
> blocked in
> a UPDATE statement wouldn't do so forever.
>
> What do you think of having an additional  
> javax.jdo.option.UpdateTimeout
> PMF property for this?
>
> Currently there is no way for an application to access any
> java.sql.Statement object used by the JDO implementation to invoke
> setQueryTimeout() by itself, so in order to have update timeouts with
> JDO, some extension of the spec would be necessary?
>
> Regards,
> Jörg
>
> -- 
> ____________________________________________________________________
> artnology GmbH - Milastraße 4 - 10437 Berlin - Germany
> Geschäftsführer: Ekkehard Blome (CEO), Felix Kuschnick (CCO)
> Registergericht: Amtsgericht Berlin Charlottenburg HRB 76376
> UST-Id. DE 217652550
>
> <joerg_von_frantzius.vcf>

Craig L Russell
Architect, Sun Java Enterprise System http://db.apache.org/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Mime
View raw message