Fork me on GitHub
#xtdb
<
2022-04-13
>
lepistane18:04:01

Hello, again me hope you don't mind. Question regarding entities in general. I was looking for an answer here regarding updated-at , created-at attributes i'd like to have in my entities. and i found https://clojurians.slack.com/archives/CG3AM2F7V/p1634288129331500 If i understood correctly time tracking would become available within next major version, this was 6 months ago so i am wondering if that's the case? Should i be adding new attributes to my entities or there is some XTDB mechanism that i am unaware of that i can utilize to get this information?

refset21:04:50

Hey 🙂 questions are always welcome! If you need to search for these times as part of your general querying, then yes you should be adding new (regular, duplicated) attributes to make them available for querying within Datalog. You could also create reified transaction entities and join against those for searching tx-times. If you only need to retrieve these times, then the solution in the gist I shared in that thread may be enough. If you need anything more advanced, like temporal joins or windowing, then you will still need to wait for the next major version - and in the meantime make do with pulling out all the necessary raw data for processing in normal Clojure. I can't share a firm roadmap just yet but I'd be very happy to chat about it if you're curious...

Nundrum18:04:53

I'm using a standalone node while trying to bootstrap a project, but find the entries keep disappearing. Is that expected? I'm not restarting the repl or in any obvious way re-defing the db node.

Steven Deobald20:04:49

"standalone", as in, in-memory?

Steven Deobald20:04:24

That's peculiar. Is your code up somewhere we can glance at? I'm guessing this will be really easy for someone to diagnose, but it's hard to know based on that description.

Nundrum20:04:49

It must be some side effect of either Liberator or vim-fireplace.

Nundrum20:04:36

I'm just discovering that it happens every time I :RunTests

Nundrum20:04:34

And defonce didn't fix it. Hrm.

refset21:04:13

so you're just doing something like (def my-node (xt/start-node {}))? with an empty opts map?

Nundrum21:04:58

Yes, that's what I've been doing

1
Nundrum21:04:16

The entries also disappear outside of using :RunTests

Nundrum21:04:42

I just replaced that with a RocksDB setup so we'll see how that goes.

🤞 1
Nundrum13:04:16

The data persisted through the night 😉 So that's a win! Having some other troubles with running tests that I'll try to work through today.

refset13:04:32

Excellent, I'm glad to hear you're over that initial hump (though I'm still curious as to what might have been happening!)

1
Steven Deobald16:04:40

I'm also very curious. That's peculiar behaviour. And probably something we want to document, assuming it's consistent with :RunTests.

Nundrum16:04:38

It was definitely consistent with :RunTests. Should I have done anything special beyond (def node (xt/start-node {}))?

Nundrum16:04:09

And I used lein ring server-headless to start the repl, if that makes any difference.

Steven Deobald16:04:20

Nothing special should be required... but the :reload on line 2541 of https://github.com/tpope/vim-fireplace/blob/master/autoload/fireplace.vim#L2516 seems maybe suspicious? Sorry I'm not more help here... I've never once in my life looked at vimscript before. To diagnose from the outside, it might be interesting to see if running the tests from another test runner entirely still causes you trouble.