https://authzed.com logo
spicedb/memdb.go at 791b44282e368cc31fc7...
f

fierro

04/04/2023, 6:54 AM
trying to send a few batches of 1,000 relationship touches. I'll paste the Go code in case anyone is interested, but so far this code has not worked against the memdb docker container, or a MySQL backed instance. Both result in about only one or two batches succeeding, the rest fail with the
serialization
error in the case of memDB, or timeout in the case of MySQL.
given a schema of
definition document {
    relation reader: user
  }

  definition user {}
Here's the Go code that demonstrated concurrent updates failing
it's been pretty reproducible for me. I started to test this against local docker container because I was seeing strange transaction timeouts against MySQL, but kind of looks like a similar issue exists in the memdb?
j

Joey

04/04/2023, 2:50 PM
memdb is not designed for scale, so I'm not surprised there
TOUCH
is also more expensive on MySQL: it has to delete the older relationship before creating the new one (if any)
use
CREATE
if you're backfilling