[ic] academic discussion about inventory under high checkout concurrency

Jeff Dafoe interchange-users@icdevgroup.org
Mon Oct 21 23:01:59 2002


    On a IC site with high checkout traffic it would also be necessary to
modify the admin interface.  The current admin interface saves inventory
modifications as absolute values.  If the inventory field indicates that you
have six items and you just received six, you put "12" in the box.  This
obviously wouldn't work on a site with crazy levels of checkout.  It would
be necessary to modify the inventory adjustment code on the admin side to
work on an adjustment basis, possibly storing the original inventory value
as a hidden form field.  Then if an inventory update was necessary it could
occur inside a db transaction where the current inventory value could be
read and modified by the appropriate amount in one atomic operation.

Jeff