On Feb 27, 2009, at 1:49 PM, Oscar Carlés wrote:
Quote:
Using Ingres II 2.6 sp3 I want to know if in a general mutex
situation sentence “Set lockmode session where timeout = <n
seconds>” using in a 4gl Vision App, will take effect. |
If you are talking about MUTEX wait state as seen in iimonitor or
ipm, the answer is no. Mutex waits (mutual exclusion waits) are
meant to be short term waits while one thread works with a data
structure that another thread needs to see in a consistent state.
In theory, a mutex wait cannot be prolonged (or shortened!) by
anything that the user does, so a very long-term mutex wait is
probably a bug. Timeouts do not apply to mutex waits.
In contrast, a user can very easily provoke a lock wait state
for others, simply by asking for a table lock, inserting a row
or doing some other update on the table, and walking away without
committing. While there is no timeout applied to the perpetrator
(and I've often thought that such a timeout should be possible),
lock timeouts allow other users waiting for the same resource to
give up instead of waiting indefinitely.
Mutexes are usually not even held across I/O, much less any sort
of user-controlled wait. The main violator of this notion is the
infamous DCB mutex, which is held for the entire duration of a
database open or close sequence, and so might be more subject to
long-ish waits than other mutexes. (This is IMHO a bug and not
a feature!)
Hope that helps...
Karl