|
From: Julian S. <js...@ac...> - 2013-06-20 15:59:26
|
On 06/20/2013 05:33 PM, John Reiser wrote: >> (1) translate "XBEGIN fail-addr" as "goto fail-addr"; that is: push >> simulated execution directly onto the failure path. This is simple >> but will have poor performance, if (as is likely) the failure path >> uses normal locking and is not tuned for speed. > > That strategy might induce a deadlock, infinite loop, or application failure > in some cases. For example, one fallback strategy for the application when > the transaction fails is: grab a larger lock (more powerful) which > logically guarantees that the transaction will succeed, then re-run > the transaction while holding that lock. Are you sure about that? The transaction might fail for entirely arbitrary reasons, such as resource exhaustion (for conflict tracking) in the hardware or due to a context switch whilst inside the transaction, so the fallback path must always be usable. Hence not providing a usable fallback path is a straight-out application bug. Do I misunderstand something? J |