Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two datoms in the same transaction conflict #1

Open
yayitswei opened this issue Sep 10, 2013 · 0 comments
Open

Two datoms in the same transaction conflict #1

yayitswei opened this issue Sep 10, 2013 · 0 comments

Comments

@yayitswei
Copy link

Trying to figure out how to use monocopy in parallel.

(defn test-monocopy [n conn]
  (doall
    (pmap
      (fn [_]
        (d/t conn
             (concat (mc/datoms {(rand) (rand)}
                                (d/tempid :db.part/user) :obj/ref))))
          (range n))))

This snippet will often produce an exception on my machine:

user=> (test-monocopy 20 conn)
ExceptionInfo :transact/datoms-conflict Two datoms in the same transaction conflict: {:d1 #Datum{:e 17592186045497 :a 76 :v :tailrecursion.monocopy/map :tx 13194139535222 :added true}, :d2 #Datum{:e 17592186045497 :a 76 :v :tailrecursion.monocopy/entry :tx 13194139535222 :added true}}  clojure.core/ex-info (core.clj:4327)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant