> -----Original Message-----
> From: Ben Rogers [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 31, 2004 3:18 PM
> To: CF-Talk
> Subject: RE: Well - I feel like an idiot.
> 
> > But the core advice of "always lock" is definitely the safer option.
> 
> I don't think I agree with the "always lock" mentality. This inevitably
> leads to deadlocks, and I don't believe ColdFusion handles deadlocks in a
> graceful way. By that I mean that ColdFusion does not roll back all
> operations in a lock (as if it were a transaction) when killing off
> deadlock
> victims.

I'm not sure how this relates in CF...

The only real way that I know of to get a real deadlock in CF is to nest
lock requests.  Like the following:

<cflock scope="Application" ...>
        <cflock scope="Session" ...>
        </cflock>
</cflock>

And even then is only a real problem if you are inconsistent with the
nesting order of the lock requests.  I don't think CF does anything special
about this however - the templates just timeout normally unable to finish
their work.

In other words I don't believe CF has the concept of deadlock victims, but I
could be wrong.  As far as I can tell when a lock request times out, it's
dead - it either skips the locked code (being unable to obtain the lock) or
ends the template with an error (depending on how you set up the lock
request).

I'm way too tired to consider this clearly, but I'm not sure I see the
potential for a deadlock where "some" locked code is run and would need to
be "rolled back" (I'm not sure how you would roll back arbitrary code even
then).

Jim Davis



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189081
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to