db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kathey Marsden <kmarsdende...@sbcglobal.net>
Subject Re: [jira] Commented: (DERBY-3678) StackOverflowException in deadlock trace
Date Mon, 26 May 2008 01:35:27 GMT
Dag H. Wanvik wrote:
> The following scenario creates a hang when a 2nd connection is made
> for the user "newuser":
>
>   
>> java -Dij.exceptionTrace=true org.apache.derby.tools.ij
>>     
>
> ij> connect 'jdbc:derby:wombat;user=newuser';
>                             -- no schema is yet created for newuser.                
         
> ij> autocommit off;
> ij> create table i (i int); -- the schema is only created for 'newuser' at this point
> 0 rows inserted/updated/deleted
>
> Notice that this session has not yet committed... now we make a new
> session with the same user:
>
> ij> connect 'jdbc:derby:wombat;user=newuser';
> ERROR 40XL1: A lock could not be obtained within the time requested
>
> Might this be what happens for you?  The first time a new user
> connects and creates a database object, his schema will be
> created. But until that session commits, another session cannot login
> with the same user name, since the new entry in SYSSCHEMAS
> corresponding to the new user's schema has not been committed either
> (it has a write lock on it so it can't be read by the second session).
>
> Note, even if you don't use explicit users, there will still be be an
> implicit user, so the same thing applies.
>
>   
note, this  issue is filed as  
https://issues.apache.org/jira/browse/DERBY-48



Mime
View raw message