Re: DDL blocking on transaction in other con nection with mvcc transaction model

Fred Toussi via Hsqldb-user <[email protected]> Sat, 24 Jul 2021 10:13:29 +0100
Newsgroups gmane.comp.java.hsqldb.user
Message-ID <[email protected]>
--===============0464450978072507981==
Content-Type: multipart/alternative;
 boundary=f72b285ef5d4426fb57a9d7910ba8f00

--f72b285ef5d4426fb57a9d7910ba8f00
Content-Type: text/plain

With MVCC model, you need to use different threads for the two connections. In your usage, the connection that attempts to create a table waits until the connection that has done the SELECT commits.  

Fred

On Fri, Jul 23, 2021, at 11:59, Rob Gansevles wrote:
> Hi,
> 
> We are experiencing sometimes a deadlock in our application when creating tables in the in-memory hsql database.
> 
> The connection is created with the hsqldb.tx=mvcc flag.
> 
> When I start a transaction in one connection (autocommit false), select some data, close both the resultset and the statement, and then create a table in another connection without committing the first connection, the application will hang.
> 
> With the default transaction model this works fine.
> 
> Is this expected behaviour, or a bug?
> 
> We could reproduce this with the latest 2.6.1 driver.
> 
> Thanks
> Rob
> 
> _______________________________________________
> Hsqldb-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user
> 

--f72b285ef5d4426fb57a9d7910ba8f00
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html><html><head><title></title><style type=3D"text/css">p.Mso=
Normal,p.MsoNoSpacing{margin:0}</style></head><body><div style=3D"font-f=
amily:Arial;">With MVCC model, you need to use different threads for the=
 two connections. In your usage, the connection that attempts to create =
a table waits until the connection that has done the SELECT commits.&nbs=
p; <br></div><div style=3D"font-family:Arial;"><br></div><div style=3D"f=
ont-family:Arial;">Fred<br></div><div style=3D"font-family:Arial;"><br><=
/div><div>On Fri, Jul 23, 2021, at 11:59, Rob Gansevles wrote:<br></div>=
<blockquote type=3D"cite" id=3D"qt" style=3D""><div dir=3D"ltr"><div>Hi,=
<br></div><div><br></div><div>We are experiencing sometimes a deadlock i=
n our application when creating tables in the in-memory hsql database.<b=
r></div><div><br></div><div>The connection is created with the hsqldb.tx=
=3Dmvcc flag.<br></div><div><br></div><div>When I start a transaction in=
 one connection (autocommit false), select some data, close both the res=
ultset and the statement, and then create a table in another connection =
without committing the first connection, the application will hang.<br><=
/div><div><br></div><div>With the default transaction model this works f=
ine.<br></div><div><br></div><div>Is this expected behaviour, or a bug?<=
br></div><div><br></div><div>We could reproduce this with the latest 2.6=
.1 driver.<br></div><div><br></div><div>Thanks<br></div><div>Rob<br></di=
v></div><div><br></div><div>____________________________________________=
___<br></div><div>Hsqldb-user mailing list<br></div><div><a href=3D"mail=
to:[email protected]">[email protected]<=
/a><br></div><div><a href=3D"https://lists.sourceforge.net/lists/listinf=
o/hsqldb-user">https://lists.sourceforge.net/lists/listinfo/hsqldb-user<=
/a><br></div><div><br></div></blockquote><div style=3D"font-family:Arial=
;"><br></div></body></html>
--f72b285ef5d4426fb57a9d7910ba8f00--


--===============0464450978072507981==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============0464450978072507981==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Hsqldb-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user

--===============0464450978072507981==--