Fork me on GitHub

Is crux meant to assert specs when doing puts?


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


Nothing major. I could change the spec. Just surprising


Is submit-tx sync or async btw?


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


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.


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


On my own data I mean


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?


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)


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


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


Isolated the problem


Run the last bit twice and the problem should show up


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


Hmmm… seems a little bit brittle towards my abuse 😛


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


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


Latest version. I'm using jdbc with h2

👍 4
Jack Park00:04:53

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