Fork me on GitHub
#datomic
<
2018-12-12
>
ro604:12:19

@marshall @jaret Just thought you guys should know, I tried switching to the new CloudFormation console view when Amazon prompted, and when I tried to upgrade to 454 via https://s3.amazonaws.com/datomic-cloud-1/cft/454-8573/datomic-storage-454-8573.json (it's my first upgrade), I couldn't find the Reuse Existing Storage option. Once I switched back to the old console UI, it was there again.

ro604:12:03

Actually, I think what happened is they changed the way they compose the UI from your configuration, because now it looks like this:

Other parameters
Restart
Set to 'false' only when initially creating a system, must be set to 'true' every time thereafter
Much less descriptive than before. I'm trying to complete the process using the new UI and I'll report back...

henrik04:12:53

I ran into the same problem. I had to go back and read everything carefully to find it. Other than that, the new UI is quite nice.

ro604:12:03

Actually, I think what happened is they changed the way they compose the UI from your configuration, because now it looks like this:

Other parameters
Restart
Set to 'false' only when initially creating a system, must be set to 'true' every time thereafter
Much less descriptive than before. I'm trying to complete the process using the new UI and I'll report back...

joshkh12:12:00

i have a single ion function that routes my API, and quite often i get back a response: java.io.IOException: Connection reset by peer. a second or third try sometimes solves the problem. not knowing much about CloudWatch logs, how can i debug this?

joshkh12:12:14

that's without any new deployments

Oleh K.13:12:13

Can I receive the last time an attribute was updated in datomic? Something like this, but this doesn't work:

(d/q '[:find (max ?tx-time)
                :in $ ?user
                :where
                [?user]
                [?user :user/password ?password]
                [?password _ _ ?tx _]
                [?tx :db/txInstant ?tx-time]]
              (d/db conn) 123))

joshkh13:12:33

i think you can just do

(d/q '{:find  [(max ?tx)]
       :in    [$]
       :where [[?p :user/email "" ?tx]]}
     (client/db))

joshkh13:12:03

whoops, that might not be exactly what you asked for.

Oleh K.13:12:44

yeah, it's not)

Oleh K.16:12:07

I've found:

(d/q
                      '[:find (max ?tx-time)
                        :in $ ?e
                        :where
                        [?e ?a _ ?tx _]
                        [?tx :db/txInstant ?tx-time]
                        [?a :db/ident :user/password]]
                      (d/history (d/db conn)) 123)

joshkh21:12:00

that's handy. thanks for sharing.

ro617:12:05

Does anyone know what configuration is required (or recommended) when creating a Datomic Client instance while running on an Ion in the cloud?

kenny17:12:24

What configuration are you referencing? The args passed to the client function?

kenny17:12:21

We pass this:

{:region      "us-west-2"
 :server-type :ion
 :system      "..."
 :endpoint    "..."}

ro617:12:40

great, thanks

ro617:12:28

- https://docs.datomic.com/cloud/ions/ions-reference.html#server-type-ion looks relevant for creating a local client to connect to a cloud system - https://docs.datomic.com/client-api/datomic.client.api.html#var-client covers the cloud and peer cases

val_waeselynck17:12:36

I'm suddenly failing to start my development environment, it seems the Datomic-Cloud private Maven repo is refusing access:

val_waeselynck17:12:22

My deps.edn is:

{:paths ["src"
         "resources"]
 :deps {org.clojure/clojure {:mvn/version "1.9.0"}
        com.datomic/ion {:mvn/version "0.9.28"}
        }
 :mvn/repos {"datomic-cloud" {:url ""}}
 :aliases
 {:dev
  {:extra-paths ["dev" "dev-resources"]
   :extra-deps {com.datomic/ion-dev {:mvn/version "0.9.186"}
                com.datomic/client-cloud {:mvn/version "0.8.71"}
                }}}}

val_waeselynck17:12:02

Strangely this happens only when I start my REPL from an EC2 instance - it's fine on my laptop.

marshall17:12:44

What region?

marshall17:12:47

does your EC2 instance have S3 read permissions via IAM?

marshall17:12:34

the deps resolution will access the s3 repos required with AWS java API calls, not just HTTP, so running on an ec2 instance will require that instance to have IAM permissions to use S3

val_waeselynck17:12:33

It's got permissions to use s3 indeed, although not that repository

marshall17:12:50

one second. i’m tracking down something that may actually be the issue

val_waeselynck17:12:04

But it's surprising that this issue would arise just now

henrik17:12:06

Is this the same error? https://dev.clojure.org/jira/browse/TDEPS-20 Symptoms seem similar.

marshall17:12:35

hrm. doesnt appear to be the issue i thought it was

marshall18:12:03

@U06GS6P1N I saw a related issue yesterday when my instance role didnt have read * for s3; not sure if that’s a viable option for you, maybe at least add read permissions for the datomic-releases-1fc2183a bucket

val_waeselynck18:12:01

I did and it worked, although I can't tell if adding the permissions solved it or if it was a transient error - not easy to tell as there must be caching involved

benoit17:12:07

How do people usually evaluate the performance differences of Datomic queries? (without being impacted by the caching)

ro618:12:27

I'm getting "Assert failed: cfg" when trying to create a client instance in the Ion Cloud. I'm passing the config map:

{:server-type :ion
:system "my-system-name"
:region "us-west-2"
:endpoint ""}

ro618:12:34

@jaret If I'm reading that correctly, it means I can't run migrations and check things worked before the instances are exposed to the world, which is what I've been hoping to do all along.

jaret20:12:38

@robert.mather.rmm I am sorry for not catching you on this earlier, I thought we had figured that out on the previous ticket by removing “defstate.” I didn’t get a chance to look at your new ticket until just now. But Marshall is right, connections as side effects of loading a namespace are not supported.

ro620:12:20

No worries. I knew that removing the defstates worked, but never got to the root of why I guess.

jaret20:12:22

Yeah I think we left that hanging once removing it worked and never found root cause for you, but looking back it makes sense now.

ro620:12:10

Is the team thinking about a way to support sanity checks during the deploy phase? That would be very nice.

marshall18:12:11

@lwhorton I missed your reply a while back - the client API source is in the jar file

👍 4
eoliphant19:12:34

Hi, i’m having a weird problem (on 441-8505). Trying to transact a bigint of any form 1N (bigint 1) (biginteger 1) causes a “ExceptionInfo Cannot write 1 as tag null” error

markbastian21:12:06

is :db/index not a valid schema attribute in datomic cloud?

markbastian21:12:08

If I try to transact this:

(d/transact conn {:tx-data [{:db/ident       :foo/bar
                                 :db/valueType   :db.type/string
                                 :db/cardinality :db.cardinality/one
                                 :db/index       true}]})
I get "Unable to resolve entity: :db/index".

marshall22:12:01

Correct, everything is index true

markbastian22:12:16

everything is indexed in the cloud?

markbastian22:12:01

I can't wait to try this out.

marshall22:12:25

Everything is indexed in on prem as well

markbastian22:12:46

is that true for in-mem?

marshall22:12:00

That flag tells datomic to include that arrtibute in the AVET index

marshall22:12:36

But all datoms are in eavt

markbastian22:12:41

right, so can I put the attribute in avet?

marshall22:12:04

Avet is "on" always in cloud

markbastian22:12:31

ok, so for on-prem avet is configurable, but cloud is always on?

markbastian22:12:40

ok, that makes sense

johnj22:12:26

also, :db/unique also implies :db/index in on-prem

markbastian22:12:28

yep, got the unique part