bishop@mhinfo.UUCP (Deborah Bishop) (03/06/91)
We are building a multi-user application using ABF. I am trying to get timeout (= 2) to return a timeout error 2 seconds after the conflicting lock is requested NOT 2 SECONDS AFTER THE FIRST LOCK IS RELEASED. (I thought this was the way it was supposed to work...) As a test, I set up (in ING_SET) lockmode read = exclusive and timeout = 2. The result: - BEFORE this set up, the second user going after a record for update got a Deadlock error when the first user released the record. - AFTER this set up, the second user gets a Timeout error WHEN THE FIRST USER RELEASES THE RECORD. Am I missing something? Is there a way to set up a NOWAIT situation so that users are told immediately when a record is not available? -- Deborah Bishop (uunet!mhinfo!bishop) Mile High Information Services Suite 3400 9101 E. Kenyon Denver CO 80237 303) 721-0851
nathab@Antares.Concordia.CA ( NATHALIE BELANGER) (03/13/91)
In article <19@mhinfo.UUCP> bishop@mhinfo.UUCP (Deborah Bishop) writes: >We are building a multi-user application using ABF. I am trying to get >timeout (= 2) to return a timeout error 2 seconds after the conflicting >lock is requested NOT 2 SECONDS AFTER THE FIRST LOCK IS RELEASED. (I >-- > Deborah Bishop (uunet!mhinfo!bishop) > Mile High Information Services Suite 3400 > 9101 E. Kenyon Denver CO 80237 > 303) 721-0851 I can't vouch for the Ultrix versions of Ingres but I was working on a similar problem on a MIPS machine running Ingres 6.2. My application (ESQL fortran) issues this command: exec sql set lockmode session where level = page readlock = exclusive timeout = 1 right at the beginning of the session. I specifically tested it this morning, because I had been working on a 'friendly' error message to return to the users. We set up the test this way: user 1 retreives a record and holds on to it, meanwhile user 2 tries to retreive the same record. User 2 received a message saying record busy. User 1 didn't receive any messages. The program in question uses the SQLCA facility to check for errors. FYI the sqlcod returned is -4702. Hope this helps!!!