Fork me on GitHub
#datomic
<
2021-12-14
>
anders09:12:32

quick question: does datomic on-prem HA require two separate license? paraphrasing from https://docs.datomic.com/on-prem/operation/ha.html > Running HA requires the use of a paid Datomic Pro license key in both transactors.

jaret12:12:32

No. A single license covers a system (two transactor machines for HA) + associated peers and that also includes needed staging/testing/dev environments.

anders12:12:57

thanks, @U1QJACBUM đź‘Ť

vlaaad10:12:01

(time
    (db/q '[:find ?c1
            :in $ %
            :where [?rc :concept/id "SgNH_hag_n9D"]
                   [?c1 :concept/type "skill"]
                   (edge ?rc "related" ?c2 _)
                   [(= ?c1 ?c2)]]
          (db/get-db 1)
          relation/rules))
  ;; "Elapsed time: 447.703084 msecs"

  (time
    (db/q '[:find ?c
            :in $ %
            :where [?rc :concept/id "SgNH_hag_n9D"]
                   [?c :concept/type "skill"]
                   (edge ?rc "related" ?c _)]
          (db/get-db 1)
          relation/rules))
  ;; "Elapsed time: 6532.150235 msecs"

vlaaad10:12:42

I thought unification will make datomic query execution engine to do less work, not more…

vlaaad10:12:15

but here I perform unification “manually” with (= ?c1 ?c2) and it performs 14 times faster then with unification…

vlaaad10:12:00

is it some weird edge case that has something to do with the rule (not sure if it’s needed here, it’s somewhat big)?

favila14:12:13

My http://my.datomic.com page seems a bit incoherent now. It shows my current license (good until may 2022), but the order history is extremely incomplete (only transaction shown is from 2015) and I don’t see any datomic downloads after 1.0.6165 and I get a 401 using maven access for newer versions of datomic-pro

Robert A. Randolph14:12:17

We're aware of the issue and working on it.

jaret15:12:40

@favila I believe we resolved the issue with https://my.datomic.com please let us know if you are still having issues or see any other oddities.

tvaughan15:12:46

$ curl -iL https://my.datomic.com HTTP/2 302 date: Tue, 14 Dec 2021 15:59:17 GMT content-type: text/html;charset=utf-8 content-length: 0 location: http://my.datomic.com:443/login server: Jetty(9.4.41.v20210516) set-cookie: my-datomic=YzJ28XgVDb9owvW3n3PsaI%2FiJxYW%2Bwg%2FN2HuNa%2BU%2BFy4pAZr0fyE6Wv0FGl7ZQtb%2B2n%2BVW4XENjY3EFCLFutKXKc%2BU7YZjF%2BwNH%2B3iF5ak76cuhkVQLLNmF8HUlWLYa13HEmm%2BNVZLVtwr9QxzC4b5et77%2FRXr8C41BkSDWEulc%3D--6NcFiZInwMk14ntSYHAxPOR2tbeaCzGRmmmqc1mD4i4%3D;Path=/;HttpOnly x-frame-options: DENY x-xss-protection: 1; mode=block x-download-options: noopen strict-transport-security: max-age=31536000; includeSubdomains x-permitted-cross-domain-policies: none x-content-type-options: nosniff content-security-policy: object-src none apigw-requestid: KWLVViAaIAMES0Q= HTTP/1.1 400 Bad Request Server: awselb/2.0 Date: Tue, 14 Dec 2021 15:59:17 GMT Content-Type: text/html Content-Length: 220 Connection: close <html> <head><title>400 The plain HTTP request was sent to HTTPS port</title></head> <body> <center><h1>400 Bad Request</h1></center> <center>The plain HTTP request was sent to HTTPS port</center> </body> </html>

tvaughan16:12:12

Note: location: 

jaret16:12:59

Thanks @U0P7ZBZCK looks like we are missing a redirect to https. Will investigate.

jaret16:12:21

its not possible to login over HTTP.

jaret16:12:37

Site should be accessible from https://my.datomic.com

tvaughan16:12:54

Works for me now. Thanks

jaret16:12:26

We're aware that we are still experiencing issues with https://my.datomic.com. Working to resolve the issue.

michele mendel17:12:52

Why does ?added in this query return true or false , and not :db/add or :db/retract ?

(d/q '{:find [?e ?a-name ?v ?added]
       :in [$]
       :where [[?e ?a ?v _ ?added]
               [?a :db/ident ?a-name]]}
     (d/history (d/db conn)))

Joe Lane17:12:41

Because the 5th position of a datom is a boolean, not the op used.

michele mendel17:12:45

Yes, but why isn't the op used?

Joe Lane17:12:40

Also @michelemendel, you probably want to do something like this.

(let [the-db (d/db conn)
      the-h-db (d/history the-db)
      a->a-name (into {} 
                      (d/q '[:find ?a ?a-name
                             :where [?a :db/ident ?a-name]]
                           the-db))]
  (map (fn [d] (update d 1 a->a-name)) (seq (d/datoms the-h-db :eavt))))

michele mendel18:12:14

I had to change it a little to make it work, but what was the intended collection to map?

michele mendel18:12:23

The map has no input collection

(map 
 (fn [d] (update d 1 a->a-name (d/datoms history-db {:index :eavt})))
 Shouldn't there be a collection here?
)

michele mendel18:12:34

Maybe you wanted to pick out the keys in a->a-name from the history.

(let [db (d/db conn)
      history-db (d/history db)
      a->a-name (->> (d/q '[:find ?a ?a-name
                            :where [?a :db/ident ?a-name]]
                          db)
                     (into {}))]
  (->> a->a-name
       (map (fn [d] (update d 1 (seq (d/datoms history-db {:index :eavt})))))))
This doesn't work, though.

Joe Lane18:12:56

(let [the-db (d/db conn)
      the-h-db (d/history the-db)
      a->a-name (into {} 
                      (d/q '[:find ?a ?a-name
                             :where [?a :db/ident ?a-name]]
                           the-db))]
  (map (fn [d] (update d 1 a->a-name))
       (seq (d/datoms the-h-db :eavt))))

Joe Lane17:12:30

Otherwise you're going to load the entire history of the database into memory

mfikes18:12:57

We've started seeing 500s again from http://my.datomic.com; opening a new thread

mfikes18:12:33

Previously HEAD requests were causing it.

mfikes18:12:28

On the surface, the fact that peek is appearing near the end of the stacktrace is consistent with the previous issue with HEAD requests

tvaughan18:12:46

I'm seeing the same problem I reported earlier too $ curl -iL https://my.datomic.com HTTP/2 302 date: Tue, 14 Dec 2021 18:27:56 GMT content-type: text/html;charset=utf-8 content-length: 0 location: http://my.datomic.com:443/login Even though the initial request is via https, the redirect is via http using port 443

Robert A. Randolph18:12:23

We're looking into it, thank you for the reports!

mfikes19:12:13

FWIW, it just worked for me.

jarrodctaylor19:12:57

We think the issues have been resolved. Thanks for hanging with us and reporting issues. Let us know if anything else pops up.