This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-03-08
Channels
- # announcements (11)
- # babashka (13)
- # beginners (11)
- # biff (2)
- # calva (17)
- # cider (19)
- # clojure (60)
- # clojure-berlin (1)
- # clojure-dev (20)
- # clojure-europe (48)
- # clojure-nl (1)
- # clojure-norway (98)
- # clojure-spec (7)
- # clojure-uk (5)
- # core-typed (32)
- # cursive (13)
- # datomic (12)
- # dev-tooling (5)
- # emacs (7)
- # figwheel-main (2)
- # graalvm (4)
- # hyperfiddle (4)
- # introduce-yourself (1)
- # malli (14)
- # missionary (32)
- # off-topic (7)
- # overtone (4)
- # pedestal (10)
- # proletarian (4)
- # re-frame (8)
- # releases (11)
- # tools-build (1)
- # tools-deps (4)
- # xtdb (38)
Does the v2 local storage flush when the node is closed, or only after enough rows (or time) has been submitted? Didn't see any obvious way to make it persist the data at shutdown
no, only after either enough rows or time, as you say. It'll persist any submitted transactions to the tx-log, so they'll be durable, but you won't necessarily get anything in the object-store just from a node closing
reason being that the blocks in the object-store need to be at deterministic intervals so that when you have multiple nodes, one node closing doesn't affect the others
Hm, then I suppose I had problems with the flushed txs getting read after (another) node starts again
ah - you may be running into https://github.com/xtdb/xtdb/issues/2789 ?
the marker of this one is that, if you submit a transaction (even an empty one) on the new node when it starts up, do you see subsequent queries returning data?
cool, ok 🙂 openly, haven't committed to the behaviour of this one yet (opinions welcome!) • we could get every node to sync on startup (this'd increase startup time) • we could find a way for the node to store its own transient state locally (although this wouldn't apply in the 'immutable architecture' case of starting nodes completely fresh) • others?
this won't affect a client-server use-case - the clients all keep track of the latest transaction that they've submitted and ask every server they talk to to ensure that it has at least that one (so read-after-write consistency is preserved)
Have to see how the client asks it, that would quite sufficient. Used to calling https://v1-docs.xtdb.com/clients/1.24.3/clojure/#_sync in v1 too, just didn't see an API for that in v2
the XT language clients do this for you automatically, so shouldn't be noticeable there
they intercept the return of submit-tx before passing it back, and then supply the latest one they've seen as the after-tx
option to any queries
what's the client btw, in your case? i.e. is it an ongoing process/browser session or similar?
so CLI's starting a new process every time, I'd guess, bit trickier to keep that state
REPL - if your REPL connection is longer living than your XT node I might be tempted to keep some sort of submit-tx/q wrapper which preserves that state
Definitely, and keeping the node around is not hard either. It's just the first use that goes off the rails
otherwise, empty transaction is probably the easiest thing to do - at least until we've figured out how peer nodes should behave at first startup 🙂
I would often want it to sync, but then again I could foresee wanting to start submitting txs too and don't care about the sync
Hmh, got an
; (err) Execution error (IllegalStateException) at org.apache.arrow.memory.BaseAllocator/close (BaseAllocator.java:477).
; (err) Memory was leaked by query. Memory leaked: (362588928)
; (err) Allocator(live-index) 0/362588928/1344965720/9223372036854775807 (res/actual/peak/limit)
; (err)
I guess I should try with an older Java than 22 :face_with_rolling_eyes: