GregTomkins
Active Member
Given this code:
Assume 'foo' has a unique index defined as the three key fields listed above, and no triggers or anything like that. If you run this code more than once simultaneously, you are obviously at risk of getting error 132.
The question is: under what circumstances will you also get a lock conflict? The answer is not "none"; if you run this simultaneously and repeatedly, you get continuous error 132's and scattered lock conflicts (seemingly, one every few seconds).
Why is that? Does Progress do some kind of internal FIND EXCLUSIVE-LOCK prior to a CREATE? Any ideas? (If it were as simple as that - I tried running a separate procedure that does a CREATE and then blocks, then ran the above code - you'd expect continuous lock conflicts but in reality, it didn't get any at all).
This is 9.1E - sorry, Tom!! - I could try this on a more recent version, but that is a bit of a hassle and I doubt it would make any difference.
Code:
REPEAT:
CREATE foo.
ASSIGN
foo.p_dt = TODAY
foo.p_logical = YES
foo.p_int = 0.
UNDO, LEAVE.
END.
Assume 'foo' has a unique index defined as the three key fields listed above, and no triggers or anything like that. If you run this code more than once simultaneously, you are obviously at risk of getting error 132.
The question is: under what circumstances will you also get a lock conflict? The answer is not "none"; if you run this simultaneously and repeatedly, you get continuous error 132's and scattered lock conflicts (seemingly, one every few seconds).
Why is that? Does Progress do some kind of internal FIND EXCLUSIVE-LOCK prior to a CREATE? Any ideas? (If it were as simple as that - I tried running a separate procedure that does a CREATE and then blocks, then ran the above code - you'd expect continuous lock conflicts but in reality, it didn't get any at all).
This is 9.1E - sorry, Tom!! - I could try this on a more recent version, but that is a bit of a hassle and I doubt it would make any difference.