12/20/2022, 7:20 AM
When would something like this happen? (and what's the recommended course of action?)
2 UNKNOWN: max retries exceeded: unable to write relationships: ERROR: could not serialize access due to read/write dependencies among transactions (SQLSTATE 40001)
I'm trying to seed our prod relations into spicedb (postgres datastore)
ah found the problem - i have a lot of resources that all users have access to. I'm using the
subject to denote these, and while seeding i was parallelizing the migration of around 1K resources at a time. since this was operating on multiple of these
objects, this was happening. i'm not sure why this didn't happen the first time I started the seeding though, this was around the 4th/5th time i ran the script and started seeing this problem
that seems to pose a problem actually, if i cant parallelize at all, then it'll take a really long time. is this expected behaviour? 2 resources that the same subjects have a relation with can't be added in parallel?