<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Datomic Knowledgebase - Questions without answers in Cloud</title>
<link>https://ask.datomic.com/index.php/unanswered/datomic/cloud</link>
<description>Powered by Question2Answer</description>
<item>
<title>Is `(pull $db2 ?e [*])` supported officially?</title>
<link>https://ask.datomic.com/index.php/937/is-pull-db2-e-supported-officially</link>
<description>&lt;p&gt;The &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/cloud/query/query-data-reference.html?search=p#pull-expressions&quot;&gt;documentation&lt;/a&gt; only mentions the syntax without a &lt;code&gt;src-var&lt;/code&gt;:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;pull-expr                  = [&#039;pull&#039; variable pattern]&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;but found that this syntax also works:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;pull-expr                  = [&#039;pull&#039; src-var variable pattern]&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I have a self-contained code example here, which demonstrates a use-case, where an entity is split between 2 Datomic databases, for privacy reasons:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://forum.datomic.com/t/pull-db-entity-pattern-is-undocumented/2299&quot;&gt;https://forum.datomic.com/t/pull-db-entity-pattern-is-undocumented/2299&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Is this variant of the &lt;code&gt;pull-expr&lt;/code&gt; in Datalog queries are not supported officially?&lt;/p&gt;
&lt;p&gt;Should I use it in production or does it have some undefined behaviour, compared to its binary arity variant?&lt;/p&gt;
&lt;p&gt;Or the documentation is just incomplete?&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/937/is-pull-db2-e-supported-officially</guid>
<pubDate>Sat, 15 Jul 2023 04:42:45 +0000</pubDate>
</item>
<item>
<title>Datomic Cloud IAM role drift on setup - is this normal?</title>
<link>https://ask.datomic.com/index.php/935/datomic-cloud-iam-role-drift-on-setup-is-this-normal</link>
<description>&lt;p&gt;hi, just set up DC for the first time (ran the two AWS cloudformation templates). The storage stack is showing drift on the IAM managed policy &lt;code&gt;datomic-admin-...&lt;/code&gt;, shows &#039;MODIFIED&#039;, in red. Is this normal upon setup? (checking the changes in the &#039;versions&#039; tab, the difference is addition of autoscaling and s3 actions to the policy; the second version, presumably causing the &#039;drift&#039;, was added during the provisioning). Is this just a setup artifact nothing to worry about? &lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/935/datomic-cloud-iam-role-drift-on-setup-is-this-normal</guid>
<pubDate>Wed, 12 Jul 2023 09:34:33 +0000</pubDate>
</item>
<item>
<title>Request Entity Too Large - clojure.lang.ExceptionInfo: Response body did not conform to Datomic client protocol</title>
<link>https://ask.datomic.com/index.php/882/request-clojure-exceptioninfo-response-conform-protocol</link>
<description>&lt;p&gt;There seems to be a bug in Datomic 990-9202 that breaks the d/tx-range function.&lt;/p&gt;
&lt;p&gt;Earlier I could use the tx-range function the fetch data from my database.&lt;/p&gt;
&lt;p&gt;But after upgrading to Datomic 990-9202 I get and exception when a transaction has too much data. &lt;/p&gt;
&lt;p&gt;&lt;code&gt;`&lt;/code&gt;&lt;br&gt;
clojure.lang.ExceptionInfo: Response body did not conform to Datomic client protocol&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cognitect.anomalies/category: :cognitect.anomalies/incorrect
 cognitect.anomalies/message: &quot;Response body did not conform to Datomic client protocol&quot;
                 http-result: {:status 413,
                               :headers
                               {&quot;apigw-requestid&quot; &quot;Vg4UxisCDoEEJsQ=&quot;,
                                &quot;server&quot; &quot;Jetty(9.4.44.v20210927)&quot;,
                                &quot;connection&quot; &quot;keep-alive&quot;,
                                &quot;content-length&quot; &quot;38&quot;,
                                &quot;date&quot; &quot;Tue, 19 Jul 2022 12:17:47 GMT&quot;,
                                &quot;content-type&quot; &quot;application/json&quot;},
                               :body &quot;{\&quot;message\&quot;:\&quot;Request Entity Too Large\&quot;}&quot;}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;`&lt;/code&gt;&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/882/request-clojure-exceptioninfo-response-conform-protocol</guid>
<pubDate>Tue, 21 Mar 2023 12:26:20 +0000</pubDate>
</item>
<item>
<title>What&#039;s the state of the art in distributed Datomic?</title>
<link>https://ask.datomic.com/index.php/863/whats-the-state-of-the-art-in-distributed-datomic</link>
<description>&lt;p&gt;I&#039;d like to get an idea of the state of the art in distributed Datomic.  FWIW, my wish list includes the ability for selected processing nodes to have local images and/or participate in federated global images, linked by CRDTs, etc. And a pony.&lt;/p&gt;
&lt;p&gt;-r&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/863/whats-the-state-of-the-art-in-distributed-datomic</guid>
<pubDate>Sun, 18 Dec 2022 00:37:33 +0000</pubDate>
</item>
<item>
<title>Querying 2000+ entities, by passing in uuids (Really slow)</title>
<link>https://ask.datomic.com/index.php/862/querying-2000-entities-by-passing-in-uuids-really-slow</link>
<description>&lt;p&gt;Passing in over 2000 uuids to mysql for a fairly simple query takes milliseconds to retrieve relevant data. However we&#039;re running into an issue with datomic where it takes noticeable longer. Is there a specific syntax to use when processing such long lists, or is the linked example the only way? &lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/on-prem/query/query.html#collection-binding&quot;&gt;https://docs.datomic.com/on-prem/query/query.html#collection-binding&lt;/a&gt;&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/862/querying-2000-entities-by-passing-in-uuids-really-slow</guid>
<pubDate>Wed, 14 Dec 2022 09:24:29 +0000</pubDate>
</item>
<item>
<title>Inconsistency between d/pull and d/q + pull for non-existent entities</title>
<link>https://ask.datomic.com/index.php/860/inconsistency-between-pull-and-pull-for-existent-entities</link>
<description>&lt;p&gt;Inconsistency between d/pull and d/q + pull for non-existent entities&lt;/p&gt;
&lt;p&gt;Datomic returns a map with the &lt;code&gt;:db/id&lt;/code&gt; of the entity being pulled, even if the entity doesn&#039;t exist in the database. For example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(d/pull (d/db conn) &#039;[*] 9999999999)
=&amp;gt; #:db{:id 9999999999}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This behavior is somewhat confusing, especially when using &lt;code&gt;d/pull&lt;/code&gt; with time filters. I was expecting &lt;code&gt;d/pull&lt;/code&gt; to return &lt;code&gt;nil&lt;/code&gt; or &lt;code&gt;#:db{:id nil}&lt;/code&gt; if the entity wasn&#039;t created at the given point in time. However, Datomic always returns a map with the entity ID:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(d/pull (as-of (d/db conn) 1) &#039;[*] 9999999999)
=&amp;gt; #:db{:id 9999999999}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Surprisingly, I see the expected behavior if I pull the entity information from a query using &lt;code&gt;d/q&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(d/q &#039;{:find [(pull ?e [*])]
        :in   [?e]}
      (d/db conn) 9999999999)
=&amp;gt; [[#:db{:id nil}]]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Is that difference in behavior expected? How can I determine if an entity existed at any point in time using &lt;code&gt;d/pull&lt;/code&gt;?&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/860/inconsistency-between-pull-and-pull-for-existent-entities</guid>
<pubDate>Sat, 10 Dec 2022 15:55:29 +0000</pubDate>
</item>
<item>
<title>How do you add relationship properties, e.g. the time a person met another person?</title>
<link>https://ask.datomic.com/index.php/854/how-you-relationship-properties-time-person-another-person</link>
<description>&lt;p&gt;I have some experience with Neo4j / cypher. In cypher relationships are first-class citizens, so they can have properties, which I really like.&lt;/p&gt;
&lt;p&gt;How do I do something similar with datalog? Do I have to have a &quot;mapping entity&quot; in between two entities that have a relationship?&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/854/how-you-relationship-properties-time-person-another-person</guid>
<pubDate>Mon, 07 Nov 2022 08:35:28 +0000</pubDate>
</item>
<item>
<title>Notifying clients of database changes in Datomic Cloud?</title>
<link>https://ask.datomic.com/index.php/719/notifying-clients-of-database-changes-in-datomic-cloud</link>
<description>&lt;p&gt;In your 2013 blog post &lt;a rel=&quot;nofollow&quot; href=&quot;https://blog.datomic.com/2013/10/the-transaction-report-queue.html&quot;&gt;The Transaction Report Queue&lt;/a&gt;, you write:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;In Datomic, you can monitor all transactions.  Any peer process in the&lt;br&gt;
system can request a transaction report queue of every transaction&lt;br&gt;
against a particular database.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Is there a change data capture or related mechanism in Datomic Cloud, where changes to the database can be pushed to a client?&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;Andrew&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/719/notifying-clients-of-database-changes-in-datomic-cloud</guid>
<pubDate>Sat, 04 Jun 2022 15:18:15 +0000</pubDate>
</item>
<item>
<title>How to authenticate and authorize access to API Gateway endpoints for datomic?</title>
<link>https://ask.datomic.com/index.php/651/authenticate-authorize-access-gateway-endpoints-datomic</link>
<description>&lt;p&gt;I&#039;m currently evaluating Datomic and I&#039;ve deployed a production topology using a split stack. DatomicCloudVersion is 9095 and DatomicCFTVersion is 884. The CloudFormation stack created two API Gateway endpoints: &lt;code&gt;datomic-[system]-client-api&lt;/code&gt; and &lt;code&gt;datomic-[system]-ions&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;From my local computer I can get a client by using &lt;code&gt;datomic-[system]-client-api&lt;/code&gt; endpoint:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(d/client {:system &quot;my-system&quot;
           :server-type :ion
           :region &quot;us-east-1&quot;
           :endpoint &quot;https://[endpoint-id].execute-api.us-east-1.amazonaws.com/&quot;})
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Above, &lt;code&gt;https://[endpoint-id].execute-api.us-east-1.amazonaws.com/&lt;/code&gt; is the client-api API Gateway endpoint. It works, but the endpoint is open to the world. I then added an IAM authorizer to &lt;code&gt;datomic-[system]-client-api&lt;/code&gt; and used an authorized IAM user to make a request to the now authenticated endpoint:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;awscurl --service execute-api -X GET https://[endpoint-id].execute-api.us-east-1.amazonaws.com --profile datomic
{:s3-auth-path &quot;long s3 path&quot;}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;awscurl&lt;/code&gt; is just a tool to make authenticated calls to AWS services. As you can see, I can get a response from the endpoint by using my local profile named &quot;datomic&quot;. If I try using regular curl without the v4 AWS signature it fails:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;curl -X GET https://[endpoint-id].execute-api.us-east-1.amazonaws.com
{&quot;message&quot;:&quot;Forbidden&quot;}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Works as expected. The problem is now I can&#039;t get a client using:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(d/client {:system &quot;my-system&quot;
           :server-type :ion
           :region &quot;us-east-1&quot;
           :creds-profile &quot;datomic&quot;
           :endpoint &quot;https://[endpoint-id].execute-api.us-east-1.amazonaws.com/&quot;})
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The response I get is:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:status 403,
:headers
{&quot;apigw-requestid&quot; &quot;EUsyNi9aIAMEPlg=&quot;,
&quot;connection&quot; &quot;keep-alive&quot;,
&quot;content-length&quot; &quot;23&quot;,
&quot;date&quot; &quot;Thu, 19 Aug 2021 17:01:40 GMT&quot;,
&quot;content-type&quot; &quot;application/json&quot;},
:body &quot;{\&quot;message\&quot;:\&quot;Forbidden\&quot;}&quot;}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It is as if the &lt;code&gt;d/client&lt;/code&gt; call is ignoring the profile or not generating the proper signature. I tried setting the &lt;code&gt;AWS_PROFILE&lt;/code&gt; environment variable as well, to no avail.&lt;/p&gt;
&lt;p&gt;Is using an IAM Authorizer not the proper way to go? How can I protect both the client-api and ions endpoints? Finally, what&#039;s the difference between the client-api and ions endpoints?&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/651/authenticate-authorize-access-gateway-endpoints-datomic</guid>
<pubDate>Thu, 19 Aug 2021 17:05:29 +0000</pubDate>
</item>
<item>
<title>Datomic returns empty results where &quot;Insufficient bindings, will cause db scan&quot; exception is expected</title>
<link>https://ask.datomic.com/index.php/644/datomic-returns-insufficient-bindings-exception-expected</link>
<description>&lt;p&gt;Hello&lt;/p&gt;
&lt;p&gt;If we change &lt;code&gt;#uuid&quot;...&quot;&lt;/code&gt; to &lt;code&gt;&quot;&quot;&lt;/code&gt; (from uuid to string), we get the exception (desired behavior)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clj -Sdeps &#039;{:deps {com.datomic/dev-local {:mvn/version &quot;0.9.232&quot;}}}&#039; -M \
  -e &quot;(require &#039;[datomic.client.api :as d])&quot; \
  -e &#039;(def client (d/client {:server-type :dev-local :system &quot;hello&quot;}))&#039; \
  -e &#039;(d/create-database client {:db-name &quot;hello&quot;})&#039; \
  -e &#039;(def conn (d/connect client {:db-name &quot;hello&quot;}))&#039; \
  -e &quot;(d/q &#039;[:find ?e :where [?e _ #uuid\&quot;00000000-0000-0000-0000-000000000000\&quot;]] (d/db conn))&quot;
=&amp;gt; #&#039;user/client
=&amp;gt; true
=&amp;gt; #&#039;user/conn
=&amp;gt; []
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Occour on (old) versions of datomic-free too&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clj -Sdeps &#039;{:deps {com.datomic/datomic-free {:mvn/version &quot;0.9.5697&quot;}}}&#039; \
  -M --report stderr \
  -e &quot;(require &#039;[datomic.api :as d])&quot; \
  -e &#039;(d/create-database &quot;datomic:mem://hello&quot;)&#039; \
  -e &#039;(def conn (d/connect &quot;datomic:mem://hello&quot;))&#039; \
  -e &quot;(d/q &#039;[:find ?e :where [?e _ #uuid\&quot;00000000-0000-0000-0000-000000000000\&quot;]] (d/db conn))&quot;
WARNING: requiring-resolve already refers to: #&#039;clojure.core/requiring-resolve in namespace: datomic.common, being replaced by: #&#039;datomic.common/requiring-resolve
=&amp;gt; true
=&amp;gt; #&#039;user/conn
=&amp;gt; #{}
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/644/datomic-returns-insufficient-bindings-exception-expected</guid>
<pubDate>Wed, 07 Jul 2021 14:30:05 +0000</pubDate>
</item>
<item>
<title>ClassCastException, d/with  inside transact function</title>
<link>https://ask.datomic.com/index.php/638/classcastexception-d-with-inside-transact-function</link>
<description>&lt;p&gt;Calling a transaction function that uses d/with in a dev-local, filesystem (i.e., not :storage-dir :mem) throws a ClassCastException on internal Datomic code.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Environment&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;com.datomic/dev-local {:mvn/version &quot;0.9.232&quot;}&lt;/li&gt;
&lt;li&gt;client-cloud 0.8.105&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;History&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Example with exception using file system dev-local.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(def client (d/client {:server-type :dev-local
                         :storage-dir &quot;/tmp/cce-bug3&quot;
                         :system      &quot;test&quot;}))
=&amp;gt; #&#039;user/client
(d/create-database client {:db-name &quot;test&quot;})
=&amp;gt; true
(def conn (d/connect client {:db-name &quot;test&quot;}))
=&amp;gt; #&#039;user/conn
(d/transact conn {:tx-data [{:db/ident       :user/name
                               :db/valueType   :db.type/string
                               :db/cardinality :db.cardinality/one}]})
=&amp;gt;
{:db-before #datomic.core.db.Db{:id &quot;test&quot;,
                                :basisT 5,
                                :indexBasisT 0,
                                :index-root-id nil,
                                :asOfT nil,
                                :sinceT nil,
                                :raw nil},
 :db-after #datomic.core.db.Db{:id &quot;test&quot;,
                               :basisT 6,
                               :indexBasisT 0,
                               :index-root-id nil,
                               :asOfT nil,
                               :sinceT nil,
                               :raw nil},
 :tx-data [#datom[13194139533318 50 #inst&quot;2021-05-09T00:49:46.400-00:00&quot; 13194139533318 true]
           #datom[73 10 :user/name 13194139533318 true]
           #datom[73 40 23 13194139533318 true]
           #datom[73 41 35 13194139533318 true]
           #datom[0 13 73 13194139533318 true]],
 :tempids {}}
(defn my-tx-fn
    [db argm]
    (let [tx-report (d/with db {:tx-data [{:user/name &quot;asd&quot;}]})]
      []))
=&amp;gt; #&#039;user/my-tx-fn
(d/transact conn {:tx-data [(list &#039;user/my-tx-fn {})]})
Execution error (ClassCastException) at datomic.dev-local.tx/datom-lookup-valfn (tx.clj:397).
class datomic.core.db.Datum cannot be cast to class java.lang.Number (datomic.core.db.Datum is in unnamed module of loader &#039;app&#039;; java.lang.Number is in module java.base of loader &#039;bootstrap&#039;)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Working memdb example.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(def client-memdb (d/client {:server-type :dev-local
                               :storage-dir :mem
                               :system      &quot;test&quot;}))
=&amp;gt; #&#039;user/client-memdb
(d/create-database client-memdb {:db-name &quot;test&quot;})
=&amp;gt; true
(def conn-memdb (d/connect client-memdb {:db-name &quot;test&quot;}))
=&amp;gt; #&#039;user/conn-memdb
(d/transact conn-memdb {:tx-data [{:db/ident       :user/name
                                     :db/valueType   :db.type/string
                                     :db/cardinality :db.cardinality/one}]})
=&amp;gt;
{:db-before #datomic.core.db.Db{:id &quot;394c7a65-bfeb-4dd4-b188-7aecd2057692&quot;,
                                :basisT 5,
                                :indexBasisT 0,
                                :index-root-id nil,
                                :asOfT nil,
                                :sinceT nil,
                                :raw nil},
 :db-after #datomic.core.db.Db{:id &quot;394c7a65-bfeb-4dd4-b188-7aecd2057692&quot;,
                               :basisT 6,
                               :indexBasisT 0,
                               :index-root-id nil,
                               :asOfT nil,
                               :sinceT nil,
                               :raw nil},
 :tx-data [#datom[13194139533318 50 #inst&quot;2021-05-09T01:02:57.965-00:00&quot; 13194139533318 true]
           #datom[73 10 :user/name 13194139533318 true]
           #datom[73 40 23 13194139533318 true]
           #datom[73 41 35 13194139533318 true]
           #datom[0 13 73 13194139533318 true]],
 :tempids {}}
(d/transact conn-memdb {:tx-data [(list &#039;user/my-tx-fn {})]})
=&amp;gt;
{:db-before #datomic.core.db.Db{:id &quot;394c7a65-bfeb-4dd4-b188-7aecd2057692&quot;,
                                :basisT 6,
                                :indexBasisT 0,
                                :index-root-id nil,
                                :asOfT nil,
                                :sinceT nil,
                                :raw nil},
 :db-after #datomic.core.db.Db{:id &quot;394c7a65-bfeb-4dd4-b188-7aecd2057692&quot;,
                               :basisT 7,
                               :indexBasisT 0,
                               :index-root-id nil,
                               :asOfT nil,
                               :sinceT nil,
                               :raw nil},
 :tx-data [#datom[13194139533319 50 #inst&quot;2021-05-09T01:03:08.042-00:00&quot; 13194139533319 true]],
 :tempids {}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Expectation&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Transaction functions that use d/with do not throw a ClassCastException. Additionally, the behavior of d/with in all Datomic environments (Cloud, File system, Memdb) is consistent. Given a &lt;a rel=&quot;nofollow&quot; href=&quot;https://forum.datomic.com/t/datomic-cloud-589-8846/1328&quot;&gt;previous Datomic Cloud release&lt;/a&gt; fixed a problem with using with-db from an Ion, it seems using d/with in a transaction function is a supported behavior.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Actual&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The final d/transact transaction function throws a ClassCastException when using d/with on some internal Datomic code. This only occurs when using a dev-local, file system environment.&lt;/p&gt;
&lt;p&gt;Full stacktrace is pasted below.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#error{:cause &quot;class datomic.core.db.Datum cannot be cast to class java.lang.Number (datomic.core.db.Datum is in unnamed module of loader &#039;app&#039;; java.lang.Number is in module java.base of loader &#039;bootstrap&#039;)&quot;,
       :via [{:type java.lang.ClassCastException,
              :message &quot;class datomic.core.db.Datum cannot be cast to class java.lang.Number (datomic.core.db.Datum is in unnamed module of loader &#039;app&#039;; java.lang.Number is in module java.base of loader &#039;bootstrap&#039;)&quot;,
              :at [datomic.dev_local.tx$datom_lookup_valfn invokeStatic &quot;tx.clj&quot; 397]}],
       :trace [[datomic.dev_local.tx$datom_lookup_valfn invokeStatic &quot;tx.clj&quot; 397]
               [datomic.dev_local.tx$datom_lookup_valfn invoke &quot;tx.clj&quot; 397]
               [datomic.dev_local.local_log.LocalLog valAt &quot;local_log.clj&quot; 56]
               [clojure.lang.RT get &quot;RT.java&quot; 760]
               [datomic.dev_local.btindex.BTIndex cons &quot;btindex.clj&quot; 281]
               [clojure.lang.RT conj &quot;RT.java&quot; 677]
               [clojure.core$conj__5390 invokeStatic &quot;core.clj&quot; 85]
               [clojure.core$conj__5390 invoke &quot;core.clj&quot; 82]
               [datomic.core.db.Db addData &quot;db.clj&quot; 2322]
               [datomic.core.db$add_ensured_data invokeStatic &quot;db.clj&quot; 3353]
               [datomic.core.db$add_ensured_data invoke &quot;db.clj&quot; 3351]
               [datomic.core.db$with_tx invokeStatic &quot;db.clj&quot; 3370]
               [datomic.core.db$with_tx invoke &quot;db.clj&quot; 3357]
               [datomic.core.db.Db with &quot;db.clj&quot; 2164]
               [datomic.core.local_db$fn__25633 invokeStatic &quot;local_db.clj&quot; 67]
               [datomic.core.local_db$fn__25633 invoke &quot;local_db.clj&quot; 24]
               [datomic.client.api.protocols$fn__11959$G__11877__11966 invoke &quot;protocols.clj&quot; 126]
               [datomic.client.api$with invokeStatic &quot;api.clj&quot; 363]
               [datomic.client.api$with invoke &quot;api.clj&quot; 353]
               [user$my_tx_fn invokeStatic &quot;user.clj&quot; 3]
               [user$my_tx_fn invoke &quot;user.clj&quot; 20]
               [clojure.lang.AFn applyToHelper &quot;AFn.java&quot; 156]
               [clojure.lang.AFn applyTo &quot;AFn.java&quot; 144]
               [clojure.lang.Var applyTo &quot;Var.java&quot; 705]
               [clojure.core$apply invokeStatic &quot;core.clj&quot; 667]
               [clojure.core$apply invoke &quot;core.clj&quot; 660]
               [datomic.core.db.ProcessExpander inject &quot;db.clj&quot; 3229]
               [datomic.core.db.ProcessInpoint inject &quot;db.clj&quot; 2950]
               [datomic.dev_local.btindex_db$expand_tx$inject_all__18586$fn__18587 invoke &quot;btindex_db.clj&quot; 440]
               [clojure.lang.PersistentVector reduce &quot;PersistentVector.java&quot; 343]
               [clojure.core$reduce invokeStatic &quot;core.clj&quot; 6827]
               [clojure.core$reduce invoke &quot;core.clj&quot; 6810]
               [datomic.dev_local.btindex_db$expand_tx$inject_all__18586 invoke &quot;btindex_db.clj&quot; 440]
               [datomic.dev_local.btindex_db$expand_tx invokeStatic &quot;btindex_db.clj&quot; 444]
               [datomic.dev_local.btindex_db$expand_tx invoke &quot;btindex_db.clj&quot; 429]
               [datomic.dev_local.btindex_db$with_tx invokeStatic &quot;btindex_db.clj&quot; 468]
               [datomic.dev_local.btindex_db$with_tx invoke &quot;btindex_db.clj&quot; 461]
               [datomic.dev_local.impl.DurableConnection transact &quot;impl.clj&quot; 161]
               [datomic.client.api$transact invokeStatic &quot;api.clj&quot; 200]
               [datomic.client.api$transact invoke &quot;api.clj&quot; 183]
               [user$eval124260 invokeStatic &quot;user.clj&quot; 25]
               [user$eval124260 invoke &quot;user.clj&quot; 25]
               [clojure.lang.Compiler eval &quot;Compiler.java&quot; 7177]
               [clojure.lang.Compiler eval &quot;Compiler.java&quot; 7132]
               [clojure.core$eval invokeStatic &quot;core.clj&quot; 3214]
               [clojure.core$eval invoke &quot;core.clj&quot; 3210]
               [nrepl.middleware.interruptible_eval$evaluate$fn__959 invoke &quot;interruptible_eval.clj&quot; 91]
               [clojure.main$repl$read_eval_print__9086$fn__9089 invoke &quot;main.clj&quot; 437]
               [clojure.main$repl$read_eval_print__9086 invoke &quot;main.clj&quot; 437]
               [clojure.main$repl$fn__9095 invoke &quot;main.clj&quot; 458]
               [clojure.main$repl invokeStatic &quot;main.clj&quot; 458]
               [clojure.main$repl doInvoke &quot;main.clj&quot; 368]
               [clojure.lang.RestFn invoke &quot;RestFn.java&quot; 1523]
               [nrepl.middleware.interruptible_eval$evaluate invokeStatic &quot;interruptible_eval.clj&quot; 84]
               [nrepl.middleware.interruptible_eval$evaluate invoke &quot;interruptible_eval.clj&quot; 56]
               [nrepl.middleware.interruptible_eval$interruptible_eval$fn__985$fn__989
                invoke
                &quot;interruptible_eval.clj&quot;
                155]
               [clojure.lang.AFn run &quot;AFn.java&quot; 22]
               [nrepl.middleware.session$session_exec$main_loop__1086$fn__1090 invoke &quot;session.clj&quot; 190]
               [nrepl.middleware.session$session_exec$main_loop__1086 invoke &quot;session.clj&quot; 189]
               [clojure.lang.AFn run &quot;AFn.java&quot; 22]
               [java.lang.Thread run &quot;Thread.java&quot; 829]]}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Evidence&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The previously pasted example is reproducible and always throws a ClassCastException.  &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We are unable to test functionality in a consistent manner. Local setups using dev-local file systems will not function as expected. Developers are unable to test features in the same way they will work in production.&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/638/classcastexception-d-with-inside-transact-function</guid>
<pubDate>Thu, 24 Jun 2021 14:57:51 +0000</pubDate>
</item>
<item>
<title>d/client external server communication</title>
<link>https://ask.datomic.com/index.php/637/d-client-external-server-communication</link>
<description>&lt;p&gt;&lt;strong&gt;Environment&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;com.datomic/client-cloud 0.8.105&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;History&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Get the docstring for &lt;code&gt;d/client&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(clojure.repl/doc d/client)
-------------------------
datomic.client.api/client
([arg-map])
  Create a client for a Datomic system. This function does not
communicate with a server and returns immediately.

For a cloud system, arg-map requires:

  :server-type   - :cloud
  :region        - AWS region, e.g. &quot;us-east-1&quot;
  :system        - your system name
  :endpoint      - IP address of your system or query group

Optionally, a cloud system arg-map accepts:

  :creds-provider  - instance of com.amazonaws.auth.AWSCredentialsProvider. Defaults to DefaultAWSCredentialsProviderChain
  :creds-profile   - name of an AWS Named Profile. See http://docs.aws.amazon.com/cli/latest/userguide/cli-multiple-profiles.html
  :proxy-port      - local port for SSH tunnel to bastion 

  Note: :creds-provider and :creds-profile are mutually exclusive, providing both will result in an error.

For a dev-local system, arg-map comprises:

  :server-type   - :dev-local (required)
  :system        - a system name (required)
  :storage-dir   - optional, overrides :storage-dir in ~/.datomic/dev-local.edn

dev-local stores databases under ${storage-dir}/${system}/${db-name}.

For a peer-server system, arg-map requires:

  :server-type   - :peer-server
  :access-key    - access-key from peer server launch
  :secret        - secret from peer server launch
  :endpoint      - peer server host:port
  :validate-hostnames  - false

Returns a client object.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Note the second sentence in the docstring: &quot;This function does not communicate with a server and returns immediately.&quot; Next call &lt;code&gt;d/client&lt;/code&gt; with an endpoint that does not exist.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(d/client {:server-type :ion
             :system      &quot;my-system&quot;
             :endpoint    &quot;http://i-dont-exist.datomic.net:8182&quot;
             :region      &quot;us-west-2&quot;})
Execution error (ExceptionInfo) at datomic.client.impl.cloud/get-s3-auth-path (cloud.clj:179).
Unable to connect to http://i-dont-exist.datomic.net:8182
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Expectation&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Calling &lt;code&gt;d/client&lt;/code&gt; does not communicate with a server.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Actual&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Calling &lt;code&gt;d/client&lt;/code&gt; does communicate with a server.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Evidence&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The above reproducible example indicates the &lt;code&gt;d/client&lt;/code&gt; function call is attempted to communicate the the passing in &lt;code&gt;:endpoint&lt;/code&gt; string given the exception thrown.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;d/client&lt;/code&gt; docstring misleads the user by saying no server communication will occur when it does occur. The result is calls to &lt;code&gt;d/client&lt;/code&gt; can fail in unexpected ways when an external server communication is not accounted for. For example, we spin up Datomic Cloud query groups dynamically and attempt to communicate with the newly spun up cluster. Until the cluster is up and healthy, we expect calls to fail at &lt;code&gt;d/connect&lt;/code&gt; with an unavailable anomaly, and instead the calls would fail at &lt;code&gt;d/client&lt;/code&gt; with an unavailable anomaly.&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/637/d-client-external-server-communication</guid>
<pubDate>Thu, 24 Jun 2021 14:55:59 +0000</pubDate>
</item>
<item>
<title>Add query group ASG metrics to query group CW dashboard</title>
<link>https://ask.datomic.com/index.php/619/add-query-group-asg-metrics-to-query-group-cw-dashboard</link>
<description>&lt;p&gt;When looking at the query group dashboard, it is helpful to know what &quot;state&quot; the ASG was in when referencing the various dashboard metrics. Currently, I must do one of the following: 1) reference these metrics in the ASG monitoring tab (e.g., &lt;a rel=&quot;nofollow&quot; href=&quot;https://us-west-2.console.aws.amazon.com/ec2autoscaling/home?region=us-west-2#/details/my-query-group?view=monitoring&quot;&gt;https://us-west-2.console.aws.amazon.com/ec2autoscaling/home?region=us-west-2#/details/my-query-group?view=monitoring&lt;/a&gt;), 2) create a CW dashboard of my own, 3) modify the existing Datomic CW dashboard to add this chart. The ASG metrics answer questions like: 1) how many instances was my query group running? 2) was my query group trying to scale out or in? 3) why did my query group not scale out or in? &lt;/p&gt;
&lt;p&gt;I would find the following &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-monitoring.html#available-cloudwatch-metrics&quot;&gt;ASG metrics&lt;/a&gt; (in order of importance) useful additions to the current query group dashboard.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In Service Instances (Count)&lt;/li&gt;
&lt;li&gt;Minimum Group Size (Count), Maximum Group Size (Count), and Desired Capacity (Count)&lt;/li&gt;
&lt;li&gt;Pending Instances (Count)&lt;/li&gt;
&lt;/ol&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/619/add-query-group-asg-metrics-to-query-group-cw-dashboard</guid>
<pubDate>Thu, 27 May 2021 17:22:27 +0000</pubDate>
</item>
<item>
<title>How might multiple systems serve the same database in different contexts?</title>
<link>https://ask.datomic.com/index.php/617/might-multiple-systems-serve-database-different-contexts</link>
<description>&lt;p&gt;From &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/cloud/operation/planning.html#namin&quot;&gt;the guide on naming&lt;/a&gt; there is the following quote:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Multiple systems might serve the same primary database in different development stages. So you might name systems via the convention &quot;[db]-[stage]&quot;, e.g.&quot;inventory-dev&quot;, &quot;inventory-staging&quot; and &quot;inventory-prod&quot;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I&#039;m trying to understand how this would work, and how I should think about my system, application, and database name, but I&#039;m not really sure how this would work.&lt;/p&gt;
&lt;p&gt;My understanding was that you have one System per Storage stack, plus some number of Compute stacks, and that databases are &quot;owned&quot; by the Storage stack, but that doesn&#039;t make sense with the quote above.&lt;/p&gt;
&lt;p&gt;Can anyone give some examples of how this would work? I&#039;ve read &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/cloud/operation/planning.html&quot;&gt;the planning guide&lt;/a&gt; but almost certainly don&#039;t fully understand it.&lt;/p&gt;
&lt;p&gt;Thank you!&lt;br&gt;
Evan&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/617/might-multiple-systems-serve-database-different-contexts</guid>
<pubDate>Mon, 24 May 2021 15:16:46 +0000</pubDate>
</item>
<item>
<title>What is a performant way to do &quot;and&quot; matching on attribute values?</title>
<link>https://ask.datomic.com/index.php/613/what-is-performant-way-to-do-and-matching-on-attribute-values</link>
<description>&lt;p&gt;So I can use&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[?entity1 ?attrname1 ?attrval]
[?entity2 ?attrname2 ?attrval]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;in a &lt;code&gt;:where&lt;/code&gt;  clause to get &lt;code&gt;?entity1&lt;/code&gt; and &lt;code&gt;?entity2&lt;/code&gt; where there exists an &lt;code&gt;?attrval&lt;/code&gt; that matches&lt;/p&gt;
&lt;p&gt;I&#039;m using&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  [(q &#039;[:find (seq ?attrval)
        :in $ ?entity ?attrname
        :where [?entity ?attrname ?attrval]]
      db ?entity1 ?attrname1) [[?attrvals1]]]
  [(q &#039;[:find (seq ?attrval)
        :in $ ?entity ?attrname
        :where [?entity ?attrname ?attrval]]
      db ?entity2 ?attrname2) [[?attrvals2]]]
  (not-join [?attrvals1 ?attrvals2]
               [(seq ?attrvals1) [?element ...]]
               (not [(contains? ?attrvals2 ?element)]))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to get &lt;code&gt;?entity1&lt;/code&gt;  and &lt;code&gt;?entity2&lt;/code&gt; where all &lt;code&gt;?attrval&lt;/code&gt;s for &lt;code&gt;?entity1&lt;/code&gt; exist for &lt;code&gt;?entity2&lt;/code&gt;. Is there a more performant way to do this??&lt;br&gt;
(This feels like a directional &quot;and&quot; to the implicit &quot;or&quot; being applied to each &lt;code&gt;attrval&lt;/code&gt; matching in the first case)&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/613/what-is-performant-way-to-do-and-matching-on-attribute-values</guid>
<pubDate>Fri, 21 May 2021 18:04:41 +0000</pubDate>
</item>
<item>
<title>AssertionError shows up as an Event?</title>
<link>https://ask.datomic.com/index.php/609/assertionerror-shows-up-as-an-event</link>
<description>&lt;p&gt;This surprised me.  In a lambda invocation, a failed &lt;code&gt;assert&lt;/code&gt; shows up as an &lt;code&gt;Event&lt;/code&gt;. I would have expected &lt;code&gt;Alert&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&quot;Msg&quot;: &quot;IonLambdaException&quot;,
&quot;Ex&quot;: {
    &quot;Via&quot;: [
        {
            &quot;Type&quot;: &quot;java.lang.AssertionError&quot;,
            &quot;Message&quot;: &quot;Assert failed: (= (count s) 16)&quot;,
        }
    ],
    &quot;Cause&quot;: &quot;Assert failed: (= (count s) 16)&quot;
},
&quot;Type&quot;: &quot;Event&quot;,
&quot;Tid&quot;: 338,
&quot;Timestamp&quot;: 162134781093
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/609/assertionerror-shows-up-as-an-event</guid>
<pubDate>Tue, 18 May 2021 15:33:51 +0000</pubDate>
</item>
<item>
<title>Use Launch Template instead of Launch Configuration</title>
<link>https://ask.datomic.com/index.php/607/use-launch-template-instead-of-launch-configuration</link>
<description>&lt;p&gt;The compute Datomic CloudFormation templates (primary and query groups) create ASGs using launch configurations. Launch configurations do not support the full set of Auto Scaling group features. For example, you cannot create an Auto Scaling group that launches both Spot and On-Demand Instances or that specifies multiple instance types or multiple launch templates. In fact, &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg.html&quot;&gt;AWS recommends&lt;/a&gt; creating ASGs using launch templates, not launch configurations. &lt;/p&gt;
&lt;p&gt;We are interested in launch templates for its support for using Spot and On-Demand instances.&lt;/p&gt;
&lt;p&gt;EDIT: As of &lt;a rel=&quot;nofollow&quot; href=&quot;https://aws.amazon.com/blogs/compute/amazon-ec2-auto-scaling-will-no-longer-add-support-for-new-ec2-features-to-launch-configurations/&quot;&gt;2021-10-20&lt;/a&gt;, launch templates will not receive any new EC2 ASG features. &lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/607/use-launch-template-instead-of-launch-configuration</guid>
<pubDate>Fri, 07 May 2021 23:38:51 +0000</pubDate>
</item>
<item>
<title>Support for recent AWS instance types</title>
<link>https://ask.datomic.com/index.php/604/support-for-recent-aws-instance-types</link>
<description>&lt;p&gt;AWS has released several new instance types that are much better price per performance. It&#039;d be great to have the Datomic query group template updated to support these instance types. The Datomic query group template currently supports the following instance types: t3.medium, m5.large, i3.large, i3.xlarge. Based on this, I propose the following additions: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;t3a.medium (~10% cheaper than t3.medium)&lt;/li&gt;
&lt;li&gt;m5a.large (~10% cheaper than m5.large)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If Datomic can run on ARM based processors then further additions can be made with even better price per performance (the new AWS Graviton2 processors are fantastic. &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.honeycomb.io/blog/graviton2-one-year-retrospective/&quot;&gt;Read about Honeycomb&#039;s success&lt;/a&gt;).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;t4g.medium (perhaps also large and xlarge, ~20% cheaper than t3.medium)&lt;/li&gt;
&lt;li&gt;m6g.large (~20% cheaper than m5.large)&lt;/li&gt;
&lt;li&gt;r6gd.large	(has NVMe based SSD, 26% cheaper than i3.large)&lt;/li&gt;
&lt;li&gt;I4i (&lt;a rel=&quot;nofollow&quot; href=&quot;https://aws.amazon.com/blogs/aws/new-storage-optimized-amazon-ec2-instances-i4i-powered-by-intel-xeon-scalable-ice-lake-processors/&quot;&gt;released 2022-04-28&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The Datomic Solo instance type could also be configurable for some inconsequential savings. See monthly prices below:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;(Current) t3.small primary + t3.nano bastion: $18.90&lt;/li&gt;
&lt;li&gt;t3a.small + t3a.nano: $17.15&lt;/li&gt;
&lt;li&gt;t4g.small + t4g.nano: $15.33&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;An example Datomic query group monthly prices. Take a query group with 2 nodes running for the full month. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;(Current) m5.large: $140.16&lt;/li&gt;
&lt;li&gt;m5a.large: $125.56 ($14.6/month savings)&lt;/li&gt;
&lt;li&gt;m6g.large: $112.42 ($27.74/month savings)&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/604/support-for-recent-aws-instance-types</guid>
<pubDate>Wed, 24 Mar 2021 18:36:03 +0000</pubDate>
</item>
<item>
<title>Make DesiredCapacity an optional parameter in the query group CF template</title>
<link>https://ask.datomic.com/index.php/603/desiredcapacity-optional-parameter-query-group-template</link>
<description>&lt;p&gt;Currently (March 2021) the Datomic query group CF template has the DesiredCapacity parameter marked as required. Because of this, during a CF template update, CF will always set the DesiredCapacity to the CF parameter for DesiredCapacity. This behavior does not work well in the following situation. &lt;/p&gt;
&lt;p&gt;In the query group template I have the &lt;code&gt;DesiredCapacity&lt;/code&gt; at 2, and &lt;code&gt;MaxCount&lt;/code&gt; at 4. I have an ASG scaling policy to target track 50% average CPU utilization. My query group is currently at the max, because the ASG scaling policy scaled up the group DesiredCapacity to 4 (to match my load). My load has increased to the point where 4 nodes is no longer sufficient. I must update the query group CF template to increase the MacCount. The problem is that when you update the MacCount from 4 to 6 via a CF template update and leave the DesiredCapacity at 2, CF will actually set the DesiredCapacity on the ASG to 2 during the high load situation. This worsens the high load situation. &lt;/p&gt;
&lt;p&gt;One option is to query the ASG for its current DesiredCapacity prior to running a CF update and set the CF parameter to the value you retrieved. This approach complicates the update procedure. It also has a &quot;read-modify-write&quot; race condition -- the DesiredCapacity could have changed from the time you read the DesiredCapacity to the time you are performing the CF update. &lt;/p&gt;
&lt;p&gt;A second option is to make the &lt;code&gt;DesiredCapacity&lt;/code&gt; parameter optional. As per the &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-desiredcapacity&quot;&gt;CF docs&lt;/a&gt;, &lt;code&gt;DesiredCapacity&lt;/code&gt; is not a required parameter. When it is not present, it defaults to the minimum size of the group. Leaving &lt;code&gt;DesiredCapacity&lt;/code&gt; unset will make it so during a CF update, CF will not modify the &lt;code&gt;DesiredCapacity&lt;/code&gt; at all -- leaving the ASG &quot;in control.&quot;&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/603/desiredcapacity-optional-parameter-query-group-template</guid>
<pubDate>Wed, 24 Mar 2021 17:24:25 +0000</pubDate>
</item>
<item>
<title>I am now seeing Iterator+offset is not available doing a an index-pull</title>
<link>https://ask.datomic.com/index.php/601/am-now-seeing-iterator-offset-not-available-doing-index-pull</link>
<description>&lt;p&gt;I am doing an index-pull in Datomic Cloud.  The request was timing out so I addedd :timeout 300000 and not &quot;Iterator+offset is not available&quot; exception starts popping up&lt;/p&gt;
&lt;p&gt;We are on 781-9041&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/601/am-now-seeing-iterator-offset-not-available-doing-index-pull</guid>
<pubDate>Mon, 08 Mar 2021 16:46:35 +0000</pubDate>
</item>
<item>
<title>Dev-local query does not support :timeout</title>
<link>https://ask.datomic.com/index.php/564/dev-local-query-does-not-support-timeout</link>
<description>&lt;p&gt;Dev-local 0.9.229 does not appear to support &lt;code&gt;:timeout&lt;/code&gt; when querying. Here is a repro. &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(def client (d/client {:server-type :dev-local
                       :system      &quot;example&quot;}))
(d/create-database client {:db-name &quot;example&quot;})
(def conn (d/connect client {:db-name &quot;example&quot;}))
(d/transact conn {:tx-data [{:db/ident       :string
                             :db/cardinality :db.cardinality/one
                             :db/valueType   :db.type/string}]})
(dotimes [n 1000]
  (d/transact conn {:tx-data (map (fn [i]
                                    {:string (str n i)}) (range 1000))}))
(first
  (d/q {:query   &#039;[:find (pull ?e [*])
                   :where
                   [?e :string]]
        :timeout 1000
        :args    [(d/db conn)]}))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The query takes longer than 1s and does not throw. I would have expected an exception thrown. &lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/564/dev-local-query-does-not-support-timeout</guid>
<pubDate>Wed, 30 Dec 2020 21:25:39 +0000</pubDate>
</item>
<item>
<title>Allow dev-local import-cloud :source and :dest to work with any :server-type</title>
<link>https://ask.datomic.com/index.php/561/allow-dev-local-import-cloud-source-dest-work-with-server-type</link>
<description>&lt;p&gt;Currently &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/cloud/dev-local.html#import-cloud&quot;&gt;import-cloud&lt;/a&gt; requires the &lt;code&gt;:source&lt;/code&gt; client &lt;code&gt;:server-type&lt;/code&gt; to be &lt;code&gt;:cloud&lt;/code&gt; and the &lt;code&gt;:dest&lt;/code&gt; &lt;code&gt;:server-type&lt;/code&gt; to be &lt;code&gt;:dev-local&lt;/code&gt;. It&#039;d be great if this function allowed any &lt;code&gt;:server-type&lt;/code&gt; to be passed for &lt;code&gt;:source&lt;/code&gt; and &lt;code&gt;:dest&lt;/code&gt;. A possible use case would be copying a dev-local database to a cloud system for testing in a staging environment. &lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/561/allow-dev-local-import-cloud-source-dest-work-with-server-type</guid>
<pubDate>Sun, 20 Dec 2020 00:37:33 +0000</pubDate>
</item>
<item>
<title>What to do about &quot;syncContext completed and\/or Request lifecycle recycled&quot;?</title>
<link>https://ask.datomic.com/index.php/514/what-about-synccontext-completed-request-lifecycle-recycled</link>
<description>&lt;p&gt;We get into a state where we see a lot of &lt;code&gt;syncContext completed and\/or Request lifecycle recycled&lt;/code&gt; &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What does it mean?&lt;/li&gt;
&lt;li&gt;What can be done about it?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The stack trace is:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&quot;Trace&quot;: [
            [
                &quot;org.eclipse.jetty.server.AsyncContextState&quot;,
                &quot;state&quot;,
                &quot;AsyncContextState.java&quot;,
                52
            ],
            [
                &quot;org.eclipse.jetty.server.AsyncContextState&quot;,
                &quot;getResponse&quot;,
                &quot;AsyncContextState.java&quot;,
                118
            ],
            [
                &quot;cognitect.http_endpoint.jetty$respond_bbuf_STAR_&quot;,
                &quot;invokeStatic&quot;,
                &quot;jetty.clj&quot;,
                326
            ],
            [
                &quot;cognitect.http_endpoint.jetty$respond_bbuf_STAR_&quot;,
                &quot;invoke&quot;,
                &quot;jetty.clj&quot;,
                323
            ],
            [
                &quot;cognitect.http_endpoint.jetty$respond_bbuf&quot;,
                &quot;invokeStatic&quot;,
                &quot;jetty.clj&quot;,
                351
            ],
            [
                &quot;cognitect.http_endpoint.jetty$respond_bbuf&quot;,
                &quot;invoke&quot;,
                &quot;jetty.clj&quot;,
                348
            ],
            [
                &quot;cognitect.http_endpoint.Endpoint&quot;,
                &quot;fail_request&quot;,
                &quot;http_endpoint.clj&quot;,
                126
            ],
            [
                &quot;cognitect.http_endpoint.Endpoint&quot;,
                &quot;respond&quot;,
                &quot;http_endpoint.clj&quot;,
                147
            ],
            [
                &quot;cognitect.http_endpoint.Endpoint$fn__13082$state_machine__8637__auto____13127$fn__13129&quot;,
                &quot;invoke&quot;,
                &quot;http_endpoint.clj&quot;,
                199
            ],
            [
                &quot;cognitect.http_endpoint.Endpoint$fn__13082$state_machine__8637__auto____13127&quot;,
                &quot;invoke&quot;,
                &quot;http_endpoint.clj&quot;,
                199
            ],
            [
                &quot;clojure.core.async.impl.ioc_macros$run_state_machine&quot;,
                &quot;invokeStatic&quot;,
                &quot;ioc_macros.clj&quot;,
                978
            ],
            [
                &quot;clojure.core.async.impl.ioc_macros$run_state_machine&quot;,
                &quot;invoke&quot;,
                &quot;ioc_macros.clj&quot;,
                977
            ],
            [
                &quot;clojure.core.async.impl.ioc_macros$run_state_machine_wrapped&quot;,
                &quot;invokeStatic&quot;,
                &quot;ioc_macros.clj&quot;,
                982
            ],
            [
                &quot;clojure.core.async.impl.ioc_macros$run_state_machine_wrapped&quot;,
                &quot;invoke&quot;,
                &quot;ioc_macros.clj&quot;,
                980
            ],
            [
                &quot;clojure.core.async.impl.ioc_macros$take_BANG_$fn__5769&quot;,
                &quot;invoke&quot;,
                &quot;ioc_macros.clj&quot;,
                991
            ],
            [
                &quot;clojure.core.async.impl.channels.ManyToManyChannel$fn__589$fn__590&quot;,
                &quot;invoke&quot;,
                &quot;channels.clj&quot;,
                95
            ],
            [
                &quot;clojure.lang.AFn&quot;,
                &quot;run&quot;,
                &quot;AFn.java&quot;,
                22
            ],
            [
                &quot;java.util.concurrent.ThreadPoolExecutor&quot;,
                &quot;runWorker&quot;,
                &quot;ThreadPoolExecutor.java&quot;,
                1149
            ],
            [
                &quot;java.util.concurrent.ThreadPoolExecutor$Worker&quot;,
                &quot;run&quot;,
                &quot;ThreadPoolExecutor.java&quot;,
                624
            ],
            [
                &quot;clojure.core.async.impl.concurrent$counted_thread_factory$reify__492$fn__493&quot;,
                &quot;invoke&quot;,
                &quot;concurrent.clj&quot;,
                29
            ],
            [
                &quot;clojure.lang.AFn&quot;,
                &quot;run&quot;,
                &quot;AFn.java&quot;,
                22
            ],
            [
                &quot;java.lang.Thread&quot;,
                &quot;run&quot;,
                &quot;Thread.java&quot;,
                748
            ]
        ]
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/514/what-about-synccontext-completed-request-lifecycle-recycled</guid>
<pubDate>Mon, 16 Nov 2020 22:03:14 +0000</pubDate>
</item>
<item>
<title>Provide way to interact with a datomic database before making the system available</title>
<link>https://ask.datomic.com/index.php/500/provide-interact-datomic-database-before-making-available</link>
<description>&lt;p&gt;Currently in Cloud there is no way to interact with a datomic database before making the system available for external requests.&lt;/p&gt;
&lt;p&gt;Potential uses:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;deploy the same code everywhere (dev &amp;amp; prod) and it does db-ensure&lt;br&gt;
actions&lt;/li&gt;
&lt;li&gt;load data and/or schema prior to the system being live &lt;/li&gt;
&lt;li&gt;start components or other system-management tooling&lt;/li&gt;
&lt;li&gt;provide (easy) way to integrate startup (e.g. mount/system-component) &lt;/li&gt;
&lt;li&gt;provide status and ability to know when pieces are started so you can finish app initialization&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/500/provide-interact-datomic-database-before-making-available</guid>
<pubDate>Mon, 02 Nov 2020 15:45:42 +0000</pubDate>
</item>
<item>
<title>Does dev-local/import-cloud handle failure in the middle of an import?</title>
<link>https://ask.datomic.com/index.php/495/does-dev-local-import-cloud-handle-failure-the-middle-import</link>
<description>&lt;p&gt;When running an import-cloud, does dev-local gracefully handle import-cloud failing in the middle of the import? i.e., it fails (gets killed or throws) and I can call import-cloud again without worrying about corrupt data, missing data, etc. &lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/495/does-dev-local-import-cloud-handle-failure-the-middle-import</guid>
<pubDate>Fri, 30 Oct 2020 16:21:53 +0000</pubDate>
</item>
<item>
<title>Allow for datomic cloud installs into pre-existing VPCs</title>
<link>https://ask.datomic.com/index.php/459/allow-for-datomic-cloud-installs-into-pre-existing-vpcs</link>
<description>&lt;p&gt;The default Marketplace/CF config is great for getting started, more greenfield usage, etc. But it doesn&#039;t accomodate more complex (but common) situations. For instance, we&#039;ve just completed a complete overhaul of our AWS infrastructure. The project had kind of shuffled into AWS. Started with one account, with lifecycle environments only segregated via security groups. After accepting that that was a VeryBadThing, went to VPC&#039;s per environment, with AWS account segregation (one for production and pre-production, another for all dev lifecycle environments), we&#039;ve now moved to something a bit more sophisticated with accounts/vpcs per lifecycle environments, dedicated shared accounts/VPCs for ingress, data vault/logging, management, etc with IPSec tunnels between them all, as opposed to VPC peering.&lt;/p&gt;
&lt;p&gt;Sorry about the excruciating detail, but just wanted to provide context. So, in this scenario, shoehorning in Datomic Cloud becomes a bit difficult. Especially in conjunction with the current app/system assumptions (bring on those multiple query groups please! :)). For instance, my plan was to give each of my devs their own sandbox Solo instance, this won&#039;t scale well (there are 40 of them ;)) of they each need their own VPC, never mind the other issues. And I guess that might be basically a separate but related request, where one could stand up multiple &#039;systems&#039; in a single VPC&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/459/allow-for-datomic-cloud-installs-into-pre-existing-vpcs</guid>
<pubDate>Sun, 25 Oct 2020 19:29:15 +0000</pubDate>
</item>
<item>
<title>Datomic CLI should support AWS SSO</title>
<link>https://ask.datomic.com/index.php/460/datomic-cli-should-support-aws-sso</link>
<description>&lt;p&gt;Datomic CLI should be able to load SSO profile from ~/.aws/config. It should be able to authorize Datomic users from AWS SSO console.&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/460/datomic-cli-should-support-aws-sso</guid>
<pubDate>Sun, 25 Oct 2020 18:24:06 +0000</pubDate>
</item>
<item>
<title>Support smaller compute instances in Datomic Cloud Production</title>
<link>https://ask.datomic.com/index.php/429/support-smaller-compute-instances-datomic-cloud-production</link>
<description>&lt;p&gt;I would love to use Ions (and perhaps Datomic itself a little as well) to run a load-light application. It needs to have HA so Solo is not an option. However Datomic Cloud only runs with i3.large or stronger, for about $90/m (w/o Datomic license) in Ireland times two (since we need at least two instances for HA). There is no way I can persuade the team to go from its two t2.small (for 2&lt;em&gt;$13) to i3.large. I understand the need for i3.&lt;/em&gt; to have fast SSD but for application with low load and little data that is not really needed. But it would be awesome to support also some &quot;underpowered&quot; instances for lighter applications and/or apps that are primarily interested in leveraging Ions as a way to deploy and run code, without heavy need for a DB.&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/429/support-smaller-compute-instances-datomic-cloud-production</guid>
<pubDate>Thu, 22 Oct 2020 16:04:44 +0000</pubDate>
</item>
<item>
<title>Cloud Backup and Recovery</title>
<link>https://ask.datomic.com/index.php/431/cloud-backup-and-recovery</link>
<description>&lt;p&gt;This feature request is discussed at &lt;a rel=&quot;nofollow&quot; href=&quot;https://forum.datomic.com/t/cloud-backups-recovery/370&quot;&gt;https://forum.datomic.com/t/cloud-backups-recovery/370&lt;/a&gt;&lt;br&gt;
The motivation for wanting backups even in the presence of a reliable storage system is guarding against human error and data corruption bugs. Migrating the data to another AWS account might be another use case.&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/431/cloud-backup-and-recovery</guid>
<pubDate>Thu, 22 Oct 2020 15:36:26 +0000</pubDate>
</item>
</channel>
</rss>