| Robert Brown 2005-05-04, 2:55 am |
| > I'm running into a problem where scheduled commands that update data are conflicting with user-initiated commands that are also trying to use that data. For instance, if a user is updating his order, but a scheduled command that manipulates order data h
as kicked off and is in the middle of its transaction, the user's command fails because it is locked out of the data by the scheduled command. To make matters worse, I have a clustered environment, so obvious solutions like using a singleton to keep track
of which orders are in the middle of an operation will not work. Any ideas?
This seems a bit of bad luck on the timing side for the user. Can't you
reschedule the scheduler command to run in the middle of the night?
My only valid suggestion would be to modify the command to peek into the
USERS table and grab the LASTSESSION value. This would give you an idea
whether the user was logged in within the last xxx minutes and provide
assurance that the user was not online when the scheduled command was
ready to update that user's data. The command would attempt to update
those users on the next scheduled run.
R
|