datomic 2025-10-21

Tried to d/transact 100,000 entities against a H2 :dev transactor DB, each with 2 sub entities (with a few datoms, not many). The Dev transactor keeled over with the following error:

H2-serialization: Retried waiting for GCLocker too often allocating 7864726 words
Restarting the dev transactor shows corruption:
Terminating process - Error starting transactor
org.h2.jdbc.JdbcSQLNonTransientConnectionException: File corrupted while reading record: "/Users/petrus/datomic/1.0.7394/data/db/datomic.mv.db". Possible solution: use the recovery tool [90030-214]
...
Caused by: org.h2.mvstore.MVStoreException: Double mark: 1b/31 [16-18, 1b-36, 3e-44, e643-] [2.1.214/6]
Will retry with batched txes, but surprised that this would cause corruption.

H2 has no guarantees about what happens when an OOM is thrown (which is what happened here). That is why we consider it a dev storage protocol.

👍 1

What are my options if I want to use Datomic from another language (like Go or Rust)? The official REST API is marked as legacy.

Build a very light weight RPC in Clojure the call the RPC from other languages

👍 1

I have an a little bit different answer. • For Write part, you can only use light weight RPC method. • For Read part, you can have another route: sync the Datomic to Postgres using Plenish and then query using SQL. (time travel not supported) • https://gaiwan.co/blog/solving-datomic-bi-integration-why-we-built-plenish/https://github.com/lambdaisland/plenish

👍 3

Thanks for sharing! I did not know about plenish until now. Looks useful!

🙌 1