This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-11-16
Channels
- # announcements (62)
- # babashka (12)
- # babashka-sci-dev (73)
- # beginners (16)
- # biff (10)
- # calva (65)
- # cider (13)
- # clerk (8)
- # clojure (31)
- # clojure-europe (16)
- # clojure-nl (1)
- # clojure-norway (19)
- # clojure-spec (24)
- # clojure-uk (5)
- # clojuredesign-podcast (18)
- # clojurescript (18)
- # dev-tooling (2)
- # emacs (30)
- # etaoin (4)
- # gratitude (3)
- # hyperfiddle (20)
- # integrant (2)
- # jobs (4)
- # kaocha (7)
- # malli (1)
- # observability (11)
- # off-topic (11)
- # pathom (12)
- # podcasts-discuss (7)
- # portal (12)
- # quil (3)
- # re-frame (6)
- # releases (1)
- # sql (22)
- # squint (5)
- # testing (79)
- # tools-deps (3)
- # xtdb (20)
Is there a way to apply the same valid time to all ops of a single transaction (short of manually preparing each op)? I'm not seeing an opt for submit-tx
and I don't think a tx fn could work.
Manually preparing each op needs a lot of care, including modifying existing transaction functions, etc.
Being able to pass valid time to submit-tx
would be great.
Hey @U02E9K53C9L interesting question - it's not been asked before! Unfortunately there's nothing built in to help with that currently. I can see the value though, if only to reduce the amount of duplicate data being stored on the log :thinking_face:

Would this be a simple/quick change? If so, I might take a shot at implementing it.
It would probably be a simple change to make, but the implications require thought and discussion time which we don't have capacity for right now. Is working around it proving unexpectedly brittle/complex?
Cool, sorry I can't be more helpful with that. Happy to be rubber duck / sounding board in the meantime though!

Is there a good way to drop all the history before some timestamp, and just retain the latest version of every doc in the database? (trying to keep disk usage low)
Migrate only the data you care about to a new instance of XTDB. We plan on doing that at some point.
longer term we are definitely going to be looking at requirements for configurable data retention lifecycle policies & automation (e.g. "evict certain classes of data after 7 years"), but currently yeah you really have to 'decant' into a fresh instance
How can I get the :xt/id
from a tx on listen? I get something like this on deletes, but don't quite see how to go from that xtdb/id to something that gets me the id. The id here was "
in case it matters.
{:xtdb.api/event-type
:xtdb.api/indexed-tx
:committed? true
:xtdb.api/tx-time #inst "2023-11-16T22:41:57.380-00:00"
:xtdb.api/tx-id 1
:xtdb.api/tx-ops '([:xtdb.api/delete #xtdb/id c8d0e9aa0ad6ad1b22c4b232a822615a263d8099])}
oh I really should have searched first 😓
I had tried xt/entity-history
before but was missing :with-corrections?
:face_palm:
hey @UJVKWJTGE thanks for following up with the answer. Clearly this is something worth documenting 🙂 📝
Well the listen docs on the site say it is experimental...
I think the docstrings in the clojure lib no longer say that though, but not sure
ah right, yeah it's definitely not experimental nowadays, apologies for the confusion there
Oh that's nice to hear, because I really on it a lot for a reason personal project I'm making