datomic

cch1 2026-03-18T19:27:20.271339Z

I think I missed something... since when have the keys :tx-id and :db-id been in https://docs.datomic.com/transactions/transaction-processing.html#monitoring-transactions? I'm seeing them with a Datomic Cloud client... Of course it's not a breaking change, but I don't remember seeing an announcement.

jaret 2026-03-26T12:02:52.560279Z

@cch1 the linked doc section is specifically talking about the tx-report-queue which is just in Pro. That doc could be improved to highlight the expected returned keys in Cloud which as you have observed differ slightly on a successful transaction (vs a speculative one). I believe the :tx-id and :db-id in the return on a successful transaction have been there from the jump. A quick look at some of my old gists show the keys going back to 2018. I will double check in the client-cloud code or the code base to confirm this isnt new. And perhaps not only is it on successful transaction but perhaps it also requires using sync. I am not sure on that. My gists seem to match yours though. I do think its worth noting that as you observed that these keys will not appear in a with-db as they are only present on real d/transact results since Cloud assigns the tx UUID at commit time.

favila 2026-03-18T23:07:25.516539Z

How are you getting the tx report? I thought only pro supported this

cch1 2026-03-18T23:07:40.552689Z

Using with-db.

favila 2026-03-18T23:08:22.621939Z

I don't follow

favila 2026-03-18T23:08:27.087919Z

Code?

cch1 2026-03-18T23:10:14.091649Z

Give me a moment, I'll try to reproduce.

favila 2026-03-18T23:11:43.241249Z

No rush; I can't give you my full attention now anyway

cch1 2026-03-18T23:17:56.567579Z

Here's a small example with a Datomic Cloud client:

(let [{conn :datomic/connection :as system} @user/sysref
      txd [{:st.generator/sysid "ubbpevua"
            :st.generator/certificates [{:st.certificate/rps [:st.rps/id :oh.gov.RPS/renewable]
                                         :oh.gov/certification-number "DELETEME22"}]}]]
  (d/transact conn {:tx-data txd}))
{:db-before {:database-id "cffcd183-2895-4242-8cdb-90f88d6157ff", :db-name "stt", :t 4669560, :next-t 4669561, :type :datomic.client/db},
 :db-after {:database-id "cffcd183-2895-4242-8cdb-90f88d6157ff", :db-name "stt", :t 4669561, :next-t 4669562, :type :datomic.client/db},
 :tx-data
 [#datom[13194144202873 50 #inst "2026-03-18T23:17:16.856-00:00" 13194144202873 true]
  #datom[237494513311796 260 2256197864865913 13194144202873 true]
  #datom[2256197864865913 335 387028094968483 13194144202873 true]
  #datom[2256197864865913 229 "DELETEME22" 13194144202873 true]],
 :tempids {"datomic.temp-1024849" 2256197864865913},
 :tx-id #uuid "3a8b5ef5-2b5f-43b7-9469-b56559bca550",
 :db-id "cffcd183-2895-4242-8cdb-90f88d6157ff"}
And here is some debugging info for my particular configuration:
(let [{client :datomic/client conn :datomic/connection :as system} @user/sysref]
  [conn client])
[{:db-name "stt", :database-id "cffcd183-2895-4242-8cdb-90f88d6157ff", :t 4669561, :next-t 4669562, :type :datomic.client/conn}
 #object[datomic.client.api.sync.Client 0x66015037 "datomic.client.api.sync.Client@66015037"]]

cch1 2026-03-18T23:24:46.446989Z

This happens with a regular tx, not a with-db transaction (my memory failed me earlier). But, FWIW, I ran the same transaction speculatively moments before running the actual transaction -and the speculative tx report looked normal (not even the anomalous :as-of key in the resulting :db-after).

cch1 2026-03-23T13:02:13.188699Z

Any thoughts, @favila?