Fork me on GitHub
#xtdb
<
2020-04-10
>
emil0r15:04:37

Is crux meant to assert specs when doing puts?

refset15:04:06

Hi, it does this as a consequence of how spec works in general, as I recall. Is it causing an issue?

emil0r16:04:13

Nothing major. I could change the spec. Just surprising

emil0r16:04:24

Is submit-tx sync or async btw?

emil0r16:04:54

Getting some behavior that would be explained if it's async

jarohen17:04:52

submit-tx returns when the transaction's been accepted by the transaction log (probably Kafka?) but it doesn't mean that your nodes have indexed the transaction yet.

jarohen17:04:35

the indexing part of Crux is async - to (reliably) see the effect of your own write in a query you have to call (await-tx node tx) to block until the node's indexed your transaction

emil0r15:04:15

On my own data I mean

emil0r20:04:04

Was having troubles with some specs and were trying to shift them around. Eventually got into this state. Any clue on what caused this and how to fix it?

jarohen18:04:50

hey @U0545PBND, thanks for the report 🙂 do you have a repro you can share with us? (currently checking to see whether we have an NDA we can send, if need be)

emil0r19:04:10

Would need to clean up a bit first, and the codebase is not open

jarohen13:04:07

we (JUXT) can sign an NDA if that'd help? the error's to do with how we split transactions and documents in Crux - when you 'put', we put the document in an separate store and then only keep a reference to it in the transaction data (so that, if the document's later evicted, we can keep the transaction details but delete the contents of the document). when a node processes a 'put', it checks to see whether all the related documents have been correctly indexed in advance - in this case, it's missing one

emil0r19:04:53

Isolated the problem

emil0r19:04:09

Run the last bit twice and the problem should show up

jarohen21:04:23

thanks 🙂 we're certainly aware of one issue where you put a doc, evict it, and re-put it, I'll dig out the issue on GH - this might be the same cause

emil0r20:04:09

Hmmm… seems a little bit brittle towards my abuse 😛

emil0r20:04:58

Running things in a test where I’m starting and stopping the database component quite fast. Crux does not appear to like that. I’m running (.close node) when stopping the database component

refset22:04:11

Interesting! Is this a standalone node? Are you using Rocks? And the latest version(s)?

emil0r09:04:17

Latest version. I'm using jdbc with h2

👍 4
Jack Park00:04:53

@U0545PBND your jdbc version, do you have a repo for that?