Modeling Clojure's STM, a user can reasonably expect an exception thrown within a dosync!! block to abort the transaction without side-effects.
This is not in fact the case.
=> (seq @(.state (avout.transaction/get-local-transaction
*avout-client*)))
(0 0 0 0 0 0 0 0)
=> (avout/dosync!! *avout-client*
(throw (RuntimeException. "FAIL!")))
run-in-transaction exception: #<RuntimeException java.lang.RuntimeException: FAIL!>
nil
=> (seq @(.state (avout.transaction/get-local-transaction
*avout-client*)))
(0 0 0 0 0 0 0 2)
Modeling Clojure's STM, a user can reasonably expect an exception thrown within a dosync!! block to abort the transaction without side-effects.
This is not in fact the case.