• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: lock operation locked more than one row issue!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lock operation locked more than one row issue!


  • Subject: Re: lock operation locked more than one row issue!
  • From: Ryan Klems <email@hidden>
  • Date: Wed, 27 May 2009 12:16:18 -0700

I'm coming in to this thread a little late, and I don't have the previous emails, but looking at the quoted parts from chuck's email... I see that its doing pessimistic locking, and you aren't expecting it to do that. One thing that I have run into in the past is when you have something specified in the model, that isn't mapped in the jdbc type info. For example, we had this exact scenario due to the model specifying varchar, and the type info not having a varchar, only a varchar2. Since it didn't know what the column was, it didn't know how to optimistically lock it, so it fell back to pessimistic locking. I actually added some code to WO (I think its in 5.5 and an unreleased 5.4), which will log a warning when this occurs, since it was such a PITA to track down when it happened to me (specifically it will warn from JDBCAdaptor.isValidQualifierType).

You might try running in the debugger and breaking on JDBCAdaptor.isValidQualifierType, see if its returning false (which would force it to fall back to pessimistic locking), and examine what the typeName is... you might find that its just ever so slightly wrong.

-Ryan

On May 27, 2009, at 11:54 AM, Chuck Hill wrote:

Hi Fred,

On May 27, 2009, at 11:29 AM, Fred Wells wrote:

OK, so after trying several different drivers and all throw some type of locking error either lock failed to retrieve any rows or lock operation locked more than one row.

It is not the driver. Really, it is not.

It is the SQL that EOF is generating. It is generating the WRONG SQL. That is the problem that you need to solve. The error you are seeing is just a symptom of the problem. You need to fix the problem.


Right now I'm just looking for any more ideas as to where look for a possible cause on this. The EOModel files seem to be fine

I'd be pretty suspicious that they are not. Are you using any data types in this table that you don't use elsewhere? CLOBs? BLOBs?



I can't find anythign out of the ordinary I'm not sure where else to look or if there are any parameters that can be changed to alter how locking is handled.

It is either in the model definition or in your code. Or, I suppose, both. You may be hitting a bug in EOF, but it is your model or code that is exposing it.



Chuck


Frederick Wells
MarketForward, a Publicis Groupe Company
427 South LaSalle St.
Chicago, Il 60605
312.220.3056

-----Chuck Hill <email@hidden> wrote: -----

To: Guido Neitzer <email@hidden>
From: Chuck Hill <email@hidden>
Date: 05/26/2009 07:18PM
cc: Development WebObjects <email@hidden>, Fred Wells <email@hidden>
Subject: Re: lock operation locked more than one row issue!



On May 26, 2009, at 5:13 PM, Guido Neitzer wrote:

> On May 26, 2009, at 1:37 PM, Chuck Hill wrote:
>
>> I am not sure what you have done then. The problem is not that it
>> is selecting multiple rows. The problem is that it is trying to
>> lock rows:
>>
>>> > > SELECT ... FROM TemplateTask t0 WITH (UPDLOCK, ROWLOCK)"
>>
>>
>> EOF should not be doing that, that is optimistic^H^H^H^H^H^H^H^
>> pessimistic locking. Something has confused EOF which causes it to
>> do this (it is a bug).
>
> Do you have to tell the plugin that explicitly? Never used MS SQL.



No, you don't. It is bad, but not that bad. ;-)

Chuck


-- Chuck Hill Senior Consultant / VP Development

Come to WOWODC'09 in San Fran this June!
http://www.wocommunity.org/wowodc09/



------------------------------------------------------------------------
Disclaimer
The information in this email and any attachments may contain proprietary and confidential information that is intended for the addressee(s) only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, retention or use of the contents of this information is prohibited. When addressed to our clients or vendors, any information contained in this e-mail or any attachments is subject to the terms and conditions in any governing contract. If you have received this e- mail in error, please immediately contact the sender and delete the e-mail.

-- Chuck Hill Senior Consultant / VP Development

Come to WOWODC'09 in San Fran this June!
http://www.wocommunity.org/wowodc09/

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: lock operation locked more than one row issue!
      • From: Mike Schrag <email@hidden>
    • Re: lock operation locked more than one row issue!
      • From: Chuck Hill <email@hidden>
References: 
 >lock operation locked more than one row issue! (From: Fred Wells <email@hidden>)
 >Re: lock operation locked more than one row issue! (From: Chuck Hill <email@hidden>)
 >Re: lock operation locked more than one row issue! (From: Fred Wells <email@hidden>)
 >Re: lock operation locked more than one row issue! (From: Chuck Hill <email@hidden>)
 >Re: lock operation locked more than one row issue! (From: Fred Wells <email@hidden>)
 >Re: lock operation locked more than one row issue! (From: Chuck Hill <email@hidden>)
 >Re: lock operation locked more than one row issue! (From: Guido Neitzer <email@hidden>)
 >Re: lock operation locked more than one row issue! (From: Chuck Hill <email@hidden>)
 >Re: lock operation locked more than one row issue! (From: Fred Wells <email@hidden>)
 >Re: lock operation locked more than one row issue! (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Prototype mutableArray savechanges error
  • Next by Date: Re: lock operation locked more than one row issue!
  • Previous by thread: Re: lock operation locked more than one row issue!
  • Next by thread: Re: lock operation locked more than one row issue!
  • Index(es):
    • Date
    • Thread