On 02/09/2015 05:02 PM, Clint Byrum wrote:
Excerpts from Jay Pipes's message of 2015-02-09 12:36:45 -0800:
CAS is preferred because it is measurably faster and more
obstruction-free than SELECT FOR UPDATE. A colleague of mine is almost
ready to publish documentation showing a benchmark of this that shows
nearly a 100% decrease in total amount of lock/wait time using CAS
versus waiting for the coarser-level certification timeout to retry the
transactions. As mentioned above, I believe this is due to the dramatic
decrease in ROLLBACKs.
I think the missing piece of the puzzle for me was that each ROLLBACK is
an expensive operation. I figured it was like a non-local return (i.e.
'raise' in python or 'throw' in java) and thus not measurably different.
But now that I think of it, there is likely quite a bit of optimization
around the query path, and not so much around the rollback path.
The bottom of this rabbit hole is simply exquisite, isn't it? :)
It is indeed. :) As soon as I think I understand it fully, a new problem
area exposes itself.
OpenStack Development Mailing List (not for usage questions)