Fork me on GitHub
#datomic
<
2016-10-14
>
robert-stuttaford05:10:49

@marshall and @jaret, one small complaint about the newest Datomic — something about Artemis in either the transactor or peer no longer suffers laptop sleep mode any more. i have to restart everything after waking my laptop, which is annoying when you’re used to running it permanently

robert-stuttaford05:10:17

2016-10-14 07:25:20.128 ERROR - o.a.activemq.artemis.core.client - AMQ214002: Failed to execute failure listener
java.lang.AbstractMethodError: datomic.artemis_client$wrap_as_failure_listener$reify__6542.connectionFailed(Lorg/apache/activemq/artemis/api/core/ActiveMQException;ZLjava/lang/String;)V

tengstrand08:10:30

When I retrieve an entity with the entity function, I get all the attributes, but I also want to know the “current transaction id” that the database is in, so that I can use as-of (later) to check if any changes has been done to the entity.

thegeez10:10:30

@teng (d/basis-t (d/entity-db entity))?

thegeez11:10:18

@teng in datomic there's tx and t and the conversion between the two with d/t->tx & d/tx->t

tengstrand11:10:28

@thegeez Ok, thanks (just figured this out, 10 sec ago!) 🙂

tengstrand11:10:59

@thegeez So there is a 1-to-1 relation between t and tx? Is there any particular reason for this that you know of?

thegeez12:10:33

I don't know for sure. I think t is an increasing int to number the transactions and tx is the entity id for a transaction and there's probably a reason why both are needed 🙂

danielstockton12:10:52

I know the tx is basically bit-shifted t xor-ed with the entid of :db.part/tx (which is 3)

danielstockton12:10:03

but also can't think why both are needed right now

tengstrand13:10:44

@danielstockton maybe a performance optimization.

danielstockton13:10:22

Have a feeling its more obvious than that