From torque-user-return-5455-apmail-db-torque-user-archive=db.apache.org@db.apache.org Wed Nov 03 22:49:54 2004 Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 44004 invoked from network); 3 Nov 2004 22:49:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 3 Nov 2004 22:49:53 -0000 Received: (qmail 9711 invoked by uid 500); 3 Nov 2004 22:49:17 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 9656 invoked by uid 500); 3 Nov 2004 22:49:16 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 9627 invoked by uid 99); 3 Nov 2004 22:49:16 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [128.163.2.150] (HELO mr1.uky.edu) (128.163.2.150) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 03 Nov 2004 14:49:15 -0800 Received: from nm.uky.edu (uksmtp1.uky.edu [128.163.184.22]) by mr1.uky.edu (8.11.6/8.11.6) with ESMTP id iA3MUf903660 for ; Wed, 3 Nov 2004 17:30:41 -0500 Received: from [172.16.128.141] skkann2 [128.163.243.199] by nm.uky.edu with NetMail SMTP Agent $Revision: 1.1.1.1 $ on Novell NetWare via secured & encrypted transport (TLS); Wed, 03 Nov 2004 17:30:41 -0500 Subject: Re: AW: Village for Oracle patch. From: Saravana Krishnan To: Apache Torque Users List In-Reply-To: <96F363742E3BAF4EBE5EA6A846DA14B45FC61C@mail.hpc-hh.de> References: <96F363742E3BAF4EBE5EA6A846DA14B45FC61C@mail.hpc-hh.de> Content-Type: text/plain; charset= Message-Id: <1099521040.3240.17.camel@r2d2> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) Date: Wed, 03 Nov 2004 17:30:40 -0500 Content-Transfer-Encoding: quoted-printable X-Mail-Router: No infection found X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Tino, I personally consider these two scenarios to be different, because if I remember right, in your case the locking was done by some other code outside your control and it was not a part of Torque. Your code ended up waiting on the locked record. In this case, the locking code and the waiting code are a part of Torque, or rather village. Ben, My suggestion for a temporary fix would be, getting the village source from me and adding a NO WAIT at the end of all the LOB related SQL queries. It shouldn't be difficult (you can find the code of interest under a method like LOBQueryString or something). The proper way to take care of this would be to look at the options passed to Village be Torque and then add NO WAIT if Torque doesn't want locking. But I'm not sure if Torque has such a property and if it does, I'm not sure if it passes it to Village Thanks, Sarav On Tue, 2004-11-02 at 06:10, Sperlich, Tino wrote: > Hi, >=20 > I have faced a similar problem lately=20 > and I think that issue is a general torque one > rather than only blob-related. > With the help of > Arne Siegel I've solved it for my part. > See Arne's comments here: > >=20 > HTH, regards, >=20 > Tino >=20 > -----Urspr=C3=BCngliche Nachricht----- > Von: Ben Bookey [mailto:ben.bookey@gistec-online.de] > Gesendet: Dienstag, 2. November 2004 09:55 > An: Apache Torque Users List > Cc: saravkrish@uky.edu > Betreff: AW: Village for Oracle patch. >=20 >=20 >=20 >=20 > Hi Saravana, >=20 >=20 > > >>Is this hanging noticed only in tables with LOBs or does it hang on a= ny > > >>table where locking is performed? > > > > This is a very good question :-) I think that this table with the LOB i= s > the > > only one where any locking is taking place in my application. My > > understanding is that Oracle locking is only done when a specific "sele= ct > * > > where * for update" command is used (this command is also system.out'd, > > presumably from your patch). If this is the case, then its the only tab= le > > where I have noticed this problem, as the remainder of the app is doing > > standard Torque Deletes, Updates and Inserts using Torque (varchar and > > numbers) and I believe from the Torque logs that no such commands are > done. >=20 > =3D=3DSo I assume you access your tables using only Torque and don't use = any > =3D=3Dcustom SQL statements to access the database. > Correct. >=20 > > One futher point I would like to add, is that this problem is not likel= y > to > > happen alot in my app. I have locked the row > > using SQLplus, and not another instance of myApp. >=20 > =3D=3DWhat do you mean by "locked the row using SQLplus"? Do you mean Sto= red > =3D=3Dprocedures? Why do you lock the row in the first place? I'm confuse= d. > =3D=3DExplain more about the scenario please. What is myApp (I can see it= s > =3D=3Dsomething you wrote ;-) ) Is your application a webapp or a standal= one > =3D=3Dapp? >=20 > MyApp is a tomcat, servlet database app with jsp. Upto max 20 users > accessing the same > oracle instance and tablespace using this app. After sleeping on it:-) th= e > only place > where locking must take place is with the BLOB. This is due to the writin= g > of the filesize normally > associated with blobs (we limit this to 30k but this can be increased if = the > customer so wishes). >=20 > In this environment users *could* get conflicts, when attempting a blob > update simultanesously on > the same row. I reproduce a locking scenario by using the > %ORACLE_HOME%\ora92\bin\SQLplus.exe, and selecting for update a particula= r > row containing a LOB for update. I then attempt a blob update with myAPP = and > it hangs until > I COMMIT on SQLplus.exe. This is in affect reproducing a slow update of t= he > blob to the database. >=20 > We are a group of three developers. >=20 > =3D=3DI think there is a way to ask Oracle to not wait (add NO WAIT at th= e > =3D=3Dend) but I'm not sure I want to make it the default option of Villa= ge. I > =3D=3Ddon't know if Torque passes on "lock requirements" to Village. If i= t > =3D=3Ddoes and I can figure out how to get that property within village, = I can > =3D=3Dadd the feature to not wait on locks. >=20 > Thats what I was thinking. Adding NO WAIT, and returning an Exception, wo= uld > remove this problem( issue would be better perhaps:-)) completely. I gue= ss > I have not really thought about the "real chances" of user-conflicts > occuring in myAPP. I suppose the chances are minimal, and because the > filesize is also minimal a second user shouldnt have to wait so long unti= l > lock is released. More conflicts would occur when the filesizes are bigge= r. >=20 > Await your comment :-) >=20 > Ben >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org > For additional commands, e-mail: torque-user-help@db.apache.org >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org > For additional commands, e-mail: torque-user-help@db.apache.org >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org > For additional commands, e-mail: torque-user-help@db.apache.org >=20 >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org