Welcome! Please see the About page for a little more info on how this works.

0 votes
in On-Prem by

Version

  • com.datomic/datomic-pro "1.0.6242"
  • transactor process 0.9.6045

Setup

Given the following transaction function definition.

(d/transact
 *conn*
 [{:db/ident :demo-fn
   :db/fn (d/function
           {:lang "clojure"
            :params '[db]
            :code '(set? #{:one})})}])

Execute the transaction function in two environments:

  1. A local environment
  2. An environment where the transactor runs in a separate process

Expectation

Regardless of the environment, the return value of set? is consistent.

Actual

  • In a local environment, the function returns true - as expected.
  • In an environment where the transactor runs in a separate process, the function returns false.

Additional Notes

The data type of a set is different in the two environments,
clojure.lang.PersistentHashSet in local and java.util.HashSet in the other.

1 Answer

0 votes
by
selected by
 
Best answer

Hello David,

Thanks for the question. Fressian serialization between tx and peer guarantees only the Java collection interfaces. We have updated the docs to include this detail.

Welcome to the Datomic Knowledgebase, where you can make features requests, ask questions and receive answers from other members of the community.
...