Re: Lock wait timeout / Repeating in Class::DBI

[prev] [thread] [next] [Date index for 2005/04/28]

From: Perrin Harkins
Subject: Re: Lock wait timeout / Repeating in Class::DBI
Date: 15:37 on 28 Apr 2005
Ian McDonald-ONLINE said:
> In the case of lock wait timeout, it might be useful to wrap all INSERT
> and UPDATE commands in something which tried the connection a fixed
> number of times in the hope the lock timed out

This sounds like some versions of a spin lock.  It probably won't hurt
anything if you are not in a situation where a lost update is a problem. 
(If you are, you should be using explicit locks with SELECT FOR UPDATE or
similar.)  It sure sounds bad to be timing out on a lock though.  I'd
suggest trying to fix the root cause first, rather than going for a
workaround like this.

- Perrin

Lock wait timeout / Repeating in Class::DBI
Ian McDonald-ONLINE 15:20 on 28 Apr 2005

Re: Lock wait timeout / Repeating in Class::DBI
Perrin Harkins 15:37 on 28 Apr 2005

Generated at 10:24 on 04 May 2005 by mariachi v0.52