Fork me on GitHub
#datomic
<
2019-03-05
>
Nolan01:03:19

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

Nolan01:03:49

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.

favila02:03:03

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

favila02:03:16

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

Nolan04:03:55

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

favila11:03:56

use the lookup ref as the db id

favila11:03:24

your cas is correct

favila11:03:20

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

favila11:03:15

this is not restricted to cas

favila11:03:24

{: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?

favila11:03:12

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

tyler14:03:59

Is there any way to build a filtered db in datomic cloud https://docs.datomic.com/cloud/time/filters.html seems to imply there is but d/filter is no longer in the api.

eoliphant17:03:44

Do Cloud/Ions support 1.10 yet?

marshall18:03:01

@eoliphant yes, the latest release uses clojure 1.10

eoliphant18:03:00

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

marshall18:03:19

agreed; i’ll look into adding that

4
eoliphant18:03:23

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."
}

pvillegas1221:03:47

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

lilactown21:03:40

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

pvillegas1223:03:03

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