This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-29
Channels
- # announcements (1)
- # babashka (83)
- # beginners (67)
- # chlorine-clover (22)
- # cider (11)
- # circleci (6)
- # clj-kondo (12)
- # cljs-dev (137)
- # cljsrn (15)
- # clojure (124)
- # clojure-europe (40)
- # clojure-italy (1)
- # clojure-nl (3)
- # clojure-norway (1)
- # clojure-serbia (3)
- # clojure-spec (19)
- # clojure-uk (14)
- # clojuredesign-podcast (5)
- # clojurescript (80)
- # conjure (49)
- # core-async (62)
- # cursive (18)
- # datascript (1)
- # datomic (64)
- # docker (28)
- # emacs (20)
- # figwheel-main (249)
- # fulcro (95)
- # graalvm (2)
- # jobs-discuss (11)
- # joker (2)
- # juxt (4)
- # lambdaisland (9)
- # leiningen (1)
- # meander (14)
- # mount (6)
- # off-topic (16)
- # pathom (46)
- # re-frame (35)
- # reagent (6)
- # reitit (5)
- # shadow-cljs (28)
- # spacemacs (6)
- # sql (18)
- # tools-deps (26)
- # vim (8)
- # xtdb (23)
- # yada (1)
Where did txc/tx-event->doc-hashes
go? :thinking_face: I was using it in a custom tx log: content-hashes (->> (set (map c/new-id (mapcat txc/tx-event->doc-hashes tx-events))))
hey @U054UD60U - looks like it's now txc/tx-events->docs
is it the same?
also, the usual heads-up that these namespaces aren't part of the Crux API and can change between releases 😉 (disclaimer disclaimer) that said, happy to help out with what to use instead
Yeah, I picked this piece of code up from somehwere else I guess.
What is then recommende to be used for a custom tx log implementation?
it now returns the docs from the doc store as well, although I don't know whether this is what you'd want in this case
it’s for the implementation of submit-tx
so I only need ti hashes I guess
are you able to share more of the implementation? my first thought would be that the Crux tx-consumer should deal with most of that for you anyway
It’s experimental but was kind of working 😉
my guess (without seeing query-tx-table
) is that crux.tx/docs
is copied from our own previous Kafka implementation, which included metadata about which docs the transaction referred to in the tx-log event
in Kafka, at least, that's no longer required, because the general tx-consumer figures out what docs are required from each transaction - so we've been able to remove it from the Kafka tx-log implementation
I see.
https://github.com/juxt/crux/commit/24d6f7568d82e9b19f46d1ddd212c7b7b4a9b09d was the commit removing it from Kafka
I saw that commit and was surprised 🙂
Would be nice to learn about what is actually needed to implement a tx log
So only the events must be stored?
Actually query-tx-table
doesn’t return the value in crux.tx/docs
either 😉
yes, only the tx-events - we decompose transaction operations (that the user supplies - excuse the internal naming here, it's not always 100% clear) into tx-events and documents. the tx-events go on the tx-log, the documents go into the document-store reason for this is that if we later want to irretrievably evict those documents, we only need mutate the document-store (replacing the documents with tombstones) - the tx-log remains unaltered
https://juxt.pro/blog/posts/crux-doc-store.html might be helpful?
Thanks, I will explore this later.