RE: Deadlock error

"Naveen Murthy" <[email protected]>
Newsgroups gmane.comp.jakarta.turbine.torque.user
Message-ID <[email protected]>
repeatable_read is one level higher than read-committed.

as name suggests, its meant to keep ur reads repeatable,
so typically, during a tran, at time T if u read a row,
then if u read again during the same tran at time T2, that row shud remain
constant. DB ensures this by locking that row (or page) after the first 
read.

in read-committed; after read in a tran, those rows/pages are released immediatly
so that other trans can modify them. but u lose the
repeatability as seen in other case.

look at ur usecase, for eg if most transactions involve only 
one actor accessing a set of resources ( for eg; if only one technician
is always allowed to work on a job) then chances of ur needing
repeatable read is very less, in that case better go with read
commited. lesser excl locks, even ur db will perf Lill faster.


Naveen


-----Original Message-----
From: Raj [mailto:[email protected]]
Sent: Fri 4/18/2008 1:46 PM
To: Apache Torque Users List
Subject: Re: Deadlock error
 
More info.. the transaction isolation level in my.cnf
is set to REPEATABLE-READ.
My google research suggested setting this to
READ-COMMITED, need to review th implications before
changing this.
Also, not sure if this is the source of the problem.
Thanks,
Raj

my.cnf:

# Set the default transaction isolation level. Levels
available are:
# READ-UNCOMMITTED, READ-COMMITTED, REPEATABLE-READ,
SERIALIZABLE
transaction_isolation = REPEATABLE-READ

--- Raj <[email protected]> wrote:

> All,
> 
> Getting a deadlock related error intermittently.
> The stack trace is as shown below.
> 
> Torque version: 3.2
> Mysql version: mysql  Ver 14.12 Distrib 5.0.33, for
> apple-darwin8.8.4 (i686) using  EditLine wrapper
> 
> Any hints?
> 
> Thanks,
> Raj
> 
> 
> org.apache.torque.TorqueException:
> java.sql.SQLException: Deadlock found when trying to
> get lock; Try restarting transaction message from
> server: "Lock wait timeout exceeded; try restarting
> transaction"
>         at
>
org.apache.torque.util.BasePeer.throwTorqueException(BasePeer.java:103)
>         at
>
org.apache.torque.util.BasePeer.insertOrUpdateRecord(BasePeer.java:639)
>         at
>
org.apache.torque.util.BasePeer.access$000(BasePeer.java:73)
>         at
>
org.apache.torque.util.BasePeer$IOUProcessCallback.process(BasePeer.java:1254)
>         at
>
org.apache.torque.util.BasePeer.processTables(BasePeer.java:1645)
>         at
>
org.apache.torque.util.BasePeer.doUpdate(BasePeer.java:1234)
> 
> 
> 
>      
>
____________________________________________________________________________________
> Be a better friend, newshound, and 
> know-it-all with Yahoo! Mobile.  Try it now. 
>
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [email protected]
> For additional commands, e-mail:
> [email protected]
> 
> 



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.