Strange multi-user timing phenomenon
- From: mscertified <rupert@xxxxxxxxxxxxx>
- Date: Thu, 3 Apr 2008 14:05:06 -0700
Problem: 2 users appear able to insert the same (unique) primary key to the
same table.
I'm attempting to enforce single-threading of a process by inserting a
record to a table. All users use the same primary key so only one
(theoretically) can succeed. Other users go into a wait and retry loop. After
processing, I delete the record thus releasing the lock. I've traced the
processing for 2 users (using timer function). The processing sequence is:
user 1 places lock
user 2 lock fails
user 1 processes record
user 2 places lock (should be impossible!)
user 2 processes record
user 1 releases lock
user 2 releases lock
A couple of questions?
Can the timer function be compared between 2 different users?
I'm assuming that inserted and deleted rows are inserted and deleted
immediately and immediately visible to other users, is this the case?
.
- Follow-Ups:
- Re: Strange multi-user timing phenomenon
- From: Paul Shapiro
- Re: Strange multi-user timing phenomenon
- Prev by Date: Update table and text box after a combo box selection is made
- Next by Date: RE: Update table and text box after a combo box selection is made
- Previous by thread: Update table and text box after a combo box selection is made
- Next by thread: Re: Strange multi-user timing phenomenon
- Index(es):
Relevant Pages
|
Loading