Joey
03/03/2022, 8:13 PMJoey
03/03/2022, 8:13 PMJoey
03/03/2022, 8:14 PMJoey
03/03/2022, 8:15 PMJoey
03/03/2022, 8:15 PMalexkorotkikh
03/03/2022, 8:15 PMalexkorotkikh
03/03/2022, 8:17 PMJoey
03/03/2022, 8:18 PMJoey
03/03/2022, 8:18 PMJoey
03/03/2022, 8:19 PMJoey
03/03/2022, 8:19 PMJoey
03/03/2022, 8:19 PMJoey
03/03/2022, 8:20 PMJoey
03/03/2022, 8:20 PMalexkorotkikh
03/03/2022, 8:22 PMwilliamdclt
03/03/2022, 9:45 PMv1.4.1
comes out, I'll want to roll it out: it will mean a new set of pods replacing the v1.4.0
ones (we use k8s) and therefore losing all the cache and probably seeing huge response time spikes.
Is it "simply" a matter of making it a slow rolling update? How slow?williamdclt
03/03/2022, 9:46 PMJake
03/03/2022, 9:47 PMJake
03/03/2022, 9:47 PMJake
03/03/2022, 9:48 PMJake
03/03/2022, 9:49 PMJake
03/03/2022, 9:50 PMwilliamdclt
03/03/2022, 10:00 PMJake
03/03/2022, 10:01 PMJake
03/03/2022, 10:01 PMJake
03/03/2022, 10:03 PMJake
03/03/2022, 10:03 PMecordell
03/03/2022, 10:05 PMwilliamdclt
03/03/2022, 10:10 PMBryan
03/03/2022, 10:30 PMzed import
is trying to import 6 million+ rows, that's about 650 connections each trying to shove through 9k tuples.
3. Postgres and MySQL both have a limit on how many placeholders you can have in a single query. This appears to be 65535 for Postgres and MySQL (https://stackoverflow.com/a/49379324, https://stackoverflow.com/a/24447922). This roughly translating to a maximum of 9362 relationship tuple writes (assuming each is going to require 7 placeholders). I didn't initially hit this limitation because I was testing with an in memory database.
The conclusion is, I think augmenting zed import
to support large scale relationship sets will require a bit more design and planning than my initial hacky batching solution offers and might extend to making changes to SpiceDB, not just zed
so it's possible to batch the batches (this is really just turtles all the way down 🐢 ).