Fork me on GitHub

I want to upgrade from Solo -> Production, but my datomic database is currently serving a paid product. Is there a way to make this operation reversible in case it does not work as expected?


You can probably update the stack with the solo template to revert.


Has anyone encountered a problem where your whole system goes down when a code deploy is initiated by a Autoscaling group action? This event is taking down our system which is then restored if we use another deployment.


I'm wondering why the #db/fn reader macro doesn't work with clj code, only EDN.

#db/fn {:lang "clojure"
        :params []
        :code (inc 1)}
when evaluated gives
Can't embed object in code, maybe print-dup not defined:
   [email protected]
which IIUC means that it's trying to eval the delay, which I'm not sure why is happening. The has been asked previously here, but w/out an answer:


because the compiler generates bytecode and doesn't know how to embed arbitrary objects (like the delay) in bytecode. if there is no special casing of how to embed some object in bytecode, the compiler falls back to calling pr, embedding the string, and then calling read-string when the bytecode is run


same thing

user=> (defmacro f [] (delay nil))
user=> (fn [] (f))
Syntax error compiling fn* at (REPL:1:1).
Can't embed object in code, maybe print-dup not defined: [email protected]


I’m not getting results binding :db.type/float values, like (d/q '[:find ?e :where [?e :some/attr 1.0]] db), only for some values. I.e. I know that valid values are (1.0 2.0 3.5), and only 2.0 returns results in that query. What could I be missing?


I now see that the following query works:

(d/q '[:find (pull ?e [*])
       [?e :some/attr ?v]
       [(> ?v 3.4)] 
       [(< ?v 3.6)]]
So it seems like a floating point error issue for exact comparisons. I guess I should be using :db.type/bigdec if I care about writing queries for exact values?


Our Datomic Cloud Solo System is failing completely, the API times out with a 504. How can we go about debugging this in AWS?


Try to pinpoint where it goes wrong first and whether it’s a Datomic issue or an ApiGateway configuration. - What happens when you invoke the lambda directly instead of through apigw? - Can you connect to the database through the bastion? - Do the datomic CloudWatch logs have anything unusual?


CloudWatch logs don’t show anything, that is the unusual part, they start not reporting anything about datomic


I’m going to try 1-2 to replicate


if your datomic system cloudwatch logs just “stop” you should forcibly restart your compute instance


I'm trying to shovel some data from kafka into datomic cloud. Is there a ready made kafka connect sink for datomic cloud or should I write my own?


I'm wondering what the best way is to validate my data when working with Datomic Cloud. I have a sha-256 hash that I want to check if it is actually a valid sha-256 before inserting it. I have a function written. Should I do that check manually before inserting it or is there a way to have rules on certain attributes?


Thank you!


@marshall I get a 'hash/sha-256?' is not allowed by datomic/ion-config.edn - {:cognitect.anomalies/category :cognitect.anomalies/forbidden, :cognitect.anomalies/message \"'hash/sha-256?' is not allowed by datomic/ion-config.edn\", :dbs [{:database-id \"<id>\", :t 24, :next-t 25, :history false}]}"}}. Does this indicate that I need to push that function up as a transaction function?

marshall18:10:08 yes, “Attribute predicates must be on the classpath of a process that is performing a transaction.” - for Cloud that means they need to be ions


Sweet thank you =]


Is there a way to combine the results of these two queries in a single query? providing a default value for "status" when the join cannot be made? I've been missing with get-else but I don't think it's exactly what I need here

;;find placed orders requests that have not been acknowledged with a
;;received status message
 '[:find ?oid
   [?e ?oid]
   (not [?status-msg :iboga.recv.order-status/order-id ?oid])]
 (d/db DB))

;;find placed orders requests that have been acknowledged with a
;;received status message and join with status
 '[:find ?oid ?status
   [?e ?oid]
   [?status-msg :iboga.recv.order-status/order-id ?oid]
   [?status-msg :iboga.recv.order-status/status ?status]]
 (d/db DB))


Something like this might work:

 '[:find ?oid ?status
   [?e ?oid]
   (or-join [?oid ?status]
            (and [?status-msg :iboga.recv.order-status/order-id ?oid]
                 [?status-msg :iboga.recv.order-status/status ?status])
            (and (not [?status-msg :iboga.recv.order-status/order-id ?oid])
                 [(ground :none) ?status]))]
 (d/db DB))
But I wonder why your status message entity cannot point directly to the order entity. Why do you have to do this "join" on the order id value.


This (not [?status-msg :iboga.recv.order-status/order-id ?oid]), in particular, might be inefficient.


That works, thanks! So you mean just having the order-id be a :db/unique attribute so all the attributes above point to the same entity, then just doing get-else for the status?


No, I mean having an attribute :iboga.recv.order-status/order that directly points to the order entity. Why having to use the "order id" value to connect the two entities?


can you use attribute predicates with database functions, or does it only work with functions on the classpath?