From: "James McGill" <[email protected]>
On Thu, Aug 12, 2010 at 1:52 PM, Jacques Le Roux <
[email protected]> wrote:
This is why I prefer to use PostGres but that's another story and of course
the same problem could occur at the ms level, 1000 time less though...
Jacques
I was hoping you would post to tell me I was wrong, and point out the
locking semantics in the delegator that the application can use.
Sorry I have no time to do that tonight, hopefully someone will jump in
though...
Jacques
My current plan is to extend the delegator and minilang so that "findOne"
and <entity-one> can have a "for update" parameter, so that at least the
application can decide to do a select for update, to introduce some locking
to avoid concurrency bugs.
Right now, it's fairly common to for us to issue inventory items until the
quantity goes below zero, because there's no way to regulate concurrency
between two threads that want to issue. There are many parts of the system
where this might not be such a problem, but on InventoryItem it's a
potential nightmare.
What do you think about my idea of giving the delegator a "select for
update" option?
--
James McGill
Phoenix AZ