Fork me on GitHub
#datomic
<
2019-07-01
>
mjmeintjes00:07:40

Hi. I'm new to datomic, so not sure if I'm missing anything: I recently tried upgrading to the latest version of datomic (5927) in order to use tuples. However, when I specify the schema, I get the following error: :db.error/not-an-entity Unable to resolve entity: :db/tupleTypes

mjmeintjes00:07:49

This is when running the following code

(d/transact c
              [{:db/ident :player/location
                :db/valueType :db.type/tuple
                :db/tupleTypes [:db.type/long :db.type/long]
                :db/cardinality :db.cardinality/one}])

marshall00:07:38

Err thats the cloud doc

mjmeintjes00:07:05

@marshall Excellent, thanks, that worked! I assumed it was something to do with upgrading the schema but couldn't find the right function to call.

mjmeintjes00:07:26

(d/administer-system {:uri "DB-URI"
                        :action :upgrade-schema})

marshall00:07:35

What's in your deps.edn

marshall00:07:05

Can you create and use a new db on that system?

marshall00:07:41

And you have upgraded the transactor to the latest?

johnj01:07:20

yes, transactor is latest, let me try creating a new db

johnj01:07:01

the transactor crashes after running d/administer-system

marshall01:07:15

Can you open a ticket with support (<mailto:[email protected]|[email protected]>) and include your transactor logs? I can have a look at it tomorrow morning

johnj01:07:51

creating database does work sure, thanks

marshall01:07:03

Ok. Glad that works.

fmnoise16:07:52

is there any way to call peer function from transactor function?

favila16:07:17

transaction functions run on the transactor whereas peer functions run on the peer. They have different environments

favila16:07:40

you could include the peer function on the transactor's classpath, but that's something you need to arrange ahead of time

fmnoise16:07:55

I'm just thinking how I can call datomic api functions inside the transactor functions using d\... alias but same doesn't work with any other namespace

favila16:07:17

you could also install your peer function into the db and call it from your tx function with d/invoke

fmnoise16:07:29

how does it know that d\... means datomic/api

favila16:07:35

datomic api functions are on the transactor's classpath

favila16:07:47

there's no magic to tx fns

favila16:07:03

aliases and requires are syntatic, it's not automatically shipping code

favila16:07:25

the only thing shipped is a pr-str of the code body

favila16:07:35

everything else needs to be available to the transactor's runtime

favila16:07:09

classpath functions IMO are a better solution most of the time

fmnoise16:07:02

I just thought for some reason that code which uses transactor is in its classpath by default

favila16:07:37

you maybe are confused because query doesn't work this way?

fmnoise16:07:49

yep, probably

favila16:07:12

functions in a query run on your peer, so the same namespaces are available

favila16:07:27

you can invoke a fn in a query that you just def-ed a second ago in a repl

fmnoise16:07:58

eg I have myproj.utils.datetime ns with function shift-date and I want to call it from datomic tx function currently I have

Execution error at datomic.error/deserialize-exception (error.clj:154).
Syntax error compiling at (0:0).

grzm17:07:36

I see that the on-cloud Cloudformation templates have been bumped across the board for 480-8770, however only Compute is mentioned in the Release history. To be clear, if I'm on storage-470-8654.1, I don't need to update storage, correct? (doing a quick diff of the two storage templates indicates they aren't identical, though I haven't gone further to see if it's only whitespace)

marshall17:07:23

@grzm Correct. You’ll see here: https://docs.datomic.com/cloud/operation/upgrading.html#how-to-upgrade that you can check when the latest storage update was, and anything more recent than that is compute-only

grzm17:07:48

Thanks for confirming. Is there anything I need to do to coordinate ion library releases with the upgrades? Or do I only need to update the ion library when I want to use the new features?

marshall17:07:11

when you upgrade Datomic the version of the ion libraries running on your datomic nodes will be updated to whatever is the latest at that time

marshall17:07:24

but there shouldn’t be any forward-breaking changes

marshall17:07:42

if/when you push/deploy you may see that your deps are overridden

grzm17:07:50

Oh, right. Silly me. I think you owe me a playful jab for that one the next time we see each other in person.

marshall17:07:31

excluding anything listed as a critical release

dl17:07:16

hello guys, I am trying to figure out how to make use of websockets with Datomic Cloud. So that pushes are directly sent to the user

dl17:07:53

just like when using Datomic's tx-report-queue

Joe Lane18:07:28

@dlorencic1337 What have you tried?

cjsauer20:07:05

Is this anything to be alarmed about (pun intended)? It seems like CloudWatch is having trouble locating the auto-scaling policies for the datomic DynamoDB tables. I’ve updated my stack once or twice via CloudFormation…maybe they’ve been lost somehow?

4
Joe Lane20:07:12

I’m reading through the pull documentation and it’s referring to a pull syntax like (d/pull db [_release/artists] led-zeppelin) but when I attempt it with (d/pull the-db [_user/recommends] 11263397115183903) I get No such namespace: _user, however with (d/pull the-db [:user/_recommends] 11263397115183903) I get #:user{:_recommends [#:db{:id 66353327713036842}]}. Does anyone have an example with the [_user/recommends] syntax that the documentation is referring to? Am I misunderstanding how it works?

favila20:07:18

that looks like a typo to me

favila20:07:33

I think that is just a typo

Joe Lane20:07:44

Ok thanks favila.