Fork me on GitHub
#datomic
<
2023-10-25
>
uwo20:10:34

I'm not finding any documentation on :db.error/cycle-in-affinity. We recently bumped to com.datomic/peer 1.0.6735, and one of our tests is now failing with java.lang.IllegalArgumentException: :db.error/cycle-in-affinity {:e -9223301668109597984}. The test in question deals with detecting pathological component refs, namely own-parents. I'm curious if this exception is a new guardrail to prevent exactly what we are trying to work around after the fact. We're ahead of the version that fixed what appears to be an adjacent issue, discussed in this thread https://clojurians.slack.com/archives/C03RZMDSH/p1683798304779669 and fixed here https://forum.datomic.com/t/datomic-1-0-6733-pro-now-available/2227

uwo20:10:00

^ This is roughly what our test looks like

jaret18:10:27

@U09QBCNBY can I get the full stack trace?

jaret18:10:40

@U09QBCNBY disregard stack trace request.

jaret18:10:51

We attempt to put a component entity into the same partition as its parent. Previously entities with string tempids could not be assigned to any partition besides the default partition. Post-6711, we track partition assignment requests for all kinds of tempids. You could provoke the cycle-in-affinity error on a pre-6711 version of datomic if you used (d/tempid) . I'll update the case you logged too, but wanted this response here for other users who may encounter this error.

jaret18:10:51

We attempt to put a component entity into the same partition as its parent. Previously entities with string tempids could not be assigned to any partition besides the default partition. Post-6711, we track partition assignment requests for all kinds of tempids. You could provoke the cycle-in-affinity error on a pre-6711 version of datomic if you used (d/tempid) . I'll update the case you logged too, but wanted this response here for other users who may encounter this error.