On Jun 30, 6:01 pm, Rich Hickey <richhic...@gmail.com> wrote:
> MVCC history in Clojure's STM is dynamic, created by need. There is no
> read tracking, and more important for this case, no transaction
> tracking. So, if a read transaction is unable to satisfy its snapshot
> view from history, it will flag the offending ref with a fault and
> retry. When a writer sees a ref with a read fault it will grow history
> for that ref. In this way only as much history is created as is needed
> to satisfy the dynamic contention patterns, and
> tracking/synchronization is minimized.

Ok - I understand better now. I guess I had an "idealized" system in
mind where each ref (in principle) had a complete history associated
with it so reads would never need to be retried (of course, unneeded
entries would somehow be discarded when the system decides it can
never be read.) Certainly that would imply tracking transactions. I
guess you don't do this because of the overhead.

I like the pragmatics of :min-history, and I believe it would be
sufficient for many scenarios. However, I suspect we are now moving
closer to the situation that Cliff Click was predicting [1] where as a
programmer you need more precise knowledge about the STM
implementation to understand the behavior and tune its performance.

Kind Regards,
- Karl

[1] 
http://groups.google.com/group/clojure/browse_frm/thread/5c7a962cc72c1fe7/a1a0cb35070e9558
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to