Fork me on GitHub

currently calling the client api from an aws lambda. has anyone received java.lang.OutOfMemoryError: Metaspace {:cognitect.anomalies/category :cognitect.anomalies/fault, :cognitect.anomalies/message "java.lang.OutOfMemoryError: Metaspace"} while trying to do the same? it’s a super basic query: [:find ?e :in $ ?t :where [?e :some/attribute ?t]] that works without issue from the repl, and runs as quickly as expected. im suspicious of throwing more memory at the lamdba—i have others that are more involved than this one, which have never exposed this issue


for others: throwing more memory at the lambda did erase the issue, but i remain confused as to why that query would gobble more than my others.


is the result large? (queries are eager and must hold the entire result set in memory)


is :some/attribute maybe mistakenly not indexed by value?


no, the result is only 1 entity, and the entity is quite small. still didnt totally understand why that was happening but it seems to be performing correctly now

Lennart Buit10:03:54

Can I in datomic, update a :db.unique/identity datom, but only if it previously existed. So I don’t want to assert a new one if it didn’t exist, I just want to swap the value that previously existed if it was there


use the lookup ref as the db id


your cas is correct


although, if you can "change" the value of this attribute on an entity, can it really be said to be a :db.unique/identity attribute? could it just be :db.unique/value?

Lennart Buit11:03:41

Right, so you are saying that it is not unreasonable to expect a CAS failure when the “old” value was not present in the database to begin with


this is not restricted to cas


{:db/id [:unique-attr "val-that -does-not-exist] :some-other-attr "other-val"} has the same "problem"

Lennart Buit11:03:00

right yeah, that gives an error that the entity was not found right?


that is the same error the cas will give

Lennart Buit10:03:48

I tried something like: (db/transact conn {:tx-data [[:db.fn/cas [:attr "old"] :attr "old" "new"]]}), but it doesn’t feel right to catch an exception for when the cas fails because it could not find the entity


Is there any way to build a filtered db in datomic cloud seems to imply there is but d/filter is no longer in the api.


Do Cloud/Ions support 1.10 yet?


@eoliphant yes, the latest release uses clojure 1.10


sweet 🙂 thanks. Was thinking it might be good to put info like that and the java version in the release matrix or something?


agreed; i’ll look into adding that


anyone seen this before in the step function log? I have a deployment that’s crapping out here

 "error": "States.DataLimitExceeded",
 "cause": "The state/task 'arn:aws:lambda:us-east-1:946021084982:function:dat-GW-compute-CreateLambdaFromArray-12972SFV85YCH' returned a result with a size exceeding the maximum number of characters service limit."


Do ions strip out query params on the URL to API Gateway?


I believe you need to configure the API gateway to pass them through


@U4YGF4NGM I already configured them in the Request, but not getting through, do I have to redeploy the API or something?