Fork me on GitHub
#datomic
<
2020-07-20
>
Will15:07:52

Is there a way to "un-register" a transactor with a database? i.e. replace the value specified by "host" in sql.properties? also is there a way to query for what the currently configured transactor host is?

favila15:07:19

transactors actively write themselves into storage continually while they are running. to “un-register”, start a new transactor with different settings.

favila15:07:54

there’s no long-term hard association between a transactor and a storage

Will15:07:47

ok, that makes sense, thanks! is there a way to query for what the currently registered transactor(s) are?

favila15:07:50

There’s a way that relies on internal implementation details; but, why do you want to do this?

Will15:07:07

we're just having some deployment issues and wanted to confirm what the current host name is since we recently changed the VNet that the transactor VM is on

favila15:07:27

you can select the ‘pod-coord’ and ‘pod-standby’ ids, but note the timestamp

favila15:07:46

the presence of something there isn’t a guarantee a transactor is using it

Will15:07:05

sorry, I'm not sure I follow, are ‘pod-coord’ and ‘pod-standby’ entities or attributes? what would that query look like?

favila15:07:57

These are sql keys

favila15:07:48

select * from <storagename>.datomic_kv where id='pod-coord'

favila15:07:24

if you can already get a peer to connect, then you can look at its logs

Will15:07:50

ok, thank you, I'll give that a try

mafcocinco20:07:45

IIRC the datomic documentation recommends using db/ident for enumeration types. Could someone share schema declaration example of this usage? I was trying to wrap my head around how that will work but could not find any code examples demonstrating the usage. Thanks in advance.

favila20:07:41

{:db/id "new-entity" :db/ident :my-name}

marshall20:07:59

The mbrainz example uses enums for artist type, release formats, etc

Drew Verlee22:07:43

How does a q-seq query compare to a datoms avet index query in terms of performance?

Jon Walch22:07:41

I'm pretty confused at this point. I'm using lein. I removed my dependency on [com.datomic/client-cloud "0.8.101"]. I only have a dependency for [com.datomic/dev-local "0.9.180"]. I can execute:

(ns db.core
  (:require
    [datomic.client.api :as d]
    [datomic.client.api.async :as d.async]
    [clojure.core.async :as async]
    [cognitect.anomalies :as anom]
))

(defonce ^:private local-config
         {:server-type :dev-local
          :system "dev"})

(comment (d/client local-config))
perfectly fine in my repl. But (d.async/client local-config) throws:
Execution error (ExceptionInfo) at datomic.client.api.impl/incorrect (impl.clj:43).
:server-type must be :cloud or :peer-server