Magnus
By default, InstantDB will grab a table level read lock before doing a
select. This is because the default transaction level is
TRANSACTION_SERIALIZABLE. If you have connections that only perform reads,
and dirty reads are acceptable, then you could try calling:
Connection.setTransactionIsolation (Connection.TRANSACTION_READ_UNCOMMITTED)
Connections in this transaction mode will not attempt to grab table locks
(and won't be permitted to do updates either).
Regards
Pete
--
Peter Hearty peter.hearty@lutris.com
Lutris Technologies (UK) http://www.lutris.com
----- Original Message -----
From: "Magnus ?or Torfason" <magnus@handtolvur.is>
To: <instantDB@enhydra.org>
Sent: Tuesday, October 24, 2000 5:23 PM
Subject: InstantDB: InstantDB hangs sometimes (deadlock)?
> It seems to me that there is a deadlock bug in instantdb. I am using a
> webapp that has been used successfully on both PostgreSQL and on MSSQL.
> When switching to InstandDB it very often hangs, and a thread dump
> invariably reveals that at leas one thread is hanging in lockTable().
>
> Note that these are SELECT statements, that should definitely not hang
under
> any circumstances, as opposed to UPDATE statements, which of course must
> hang or fail if the table is locked.
>
> The relevant part of the thread dump follows:
>
>
> at java.lang.Object.wait(Native Method)
> at java.lang.Object.wait(Object.java:424)
> at org.enhydra.instantdb.db.Table.lockTable(Table.java:1746)
> at org.enhydra.instantdb.db.Database.lockTables(Database.java:918)
> at org.enhydra.instantdb.db.SQLProg.compile_select(SQLProg.java:1196)
> at org.enhydra.instantdb.db.SQLProg.execute(SQLProg.java:223)
> at org.enhydra.instantdb.jdbc.idbStatement.execute(idbStatement.java:235)
> at
> org.enhydra.instantdb.jdbc.idbStatement.executeQuery(idbStatement.java:91)
> at
>
com.handpoint.util.db.ConnectionContainer.executeQuery(ConnectionContainer.j
> ava:275)
> at
>
com.handpoint.infopoint.DatabaseEncapsulator.isLockedForUser(DatabaseEncapsu
> lator.java:1752)
> ...
>
>
> Any comments, fixes or workarounds really appreciated.
>
>
> Magnus Torfason,
> handPoint
> ICELAND
>
> --------------------------------------------------------------------------
---
> To unsubscribe from this mailing list, send email to majordomo@enhydra.org
> with the text "unsubscribe instantdb" in the body of the email.
> If you have other questions regarding this mailing list, send email to
> the list admin at owner-instantdb@enhydra.org.
>
-----------------------------------------------------------------------------
To unsubscribe from this mailing list, send email to majordomo@enhydra.org
with the text "unsubscribe instantdb" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at owner-instantdb@enhydra.org.
|