Fork me on GitHub
#xtdb
<
2023-12-14
>
Christian Pekeler10:12:06

When submitting a batch of transactions sequentially, the last one being smaller than all the previous ones, we’ve noticed that await-tx for all our txs returned the previous to last tx, implying that the last tx was completed before the previous to last one. Is that something that can happen?

refset11:12:14

I would expect that to happen only if you are using multiple threads / not waiting for submit-tx to return serially between each call

👍 1
refset11:12:54

given indexing on the node is the biggest CPU + I/O bottleneck you are unlikely to get end-to-end throughput improvements by using parallelism on submit-tx (although it still might be useful if you need to reduce the length of time you keep the submitter worker process alive)

refset12:12:22

I can't see a good way to control the ordering of batches if you are running submit-tx in parallel (...unless you drop to using the ~internal submit-docs API and coordinate across the threads before "finishing" the txes with the write to the tx-log)