I want to make sure I'm reading the "
# spicedb
m
I want to make sure I'm reading the "Datastore Migrations" page correctly. Does the yellow note on that page mean that each minor version is able to run on the DB schema of the previous minor version?
y
mmm we might wanna update that documentation
the behavior is: * on startup, spicedb checks to see if the head migration matches the migration it wants. if it doesn't match, it throws an error. * it doesn't check while operating, so an existing SpiceDB instance will continue to work if a new instance performs a migration, provided the database shape expected by the existing instance is compatible
many minor versions contain no migrations so they're compatible by default
m
Oh, that's problematic.
Is there a way to make sure migrations wait if another instance is already running them? I hit a race condition with 1.4 where different instances started fighting over the new index.
That is, one started creating the index. Another came online and deleted it to level set before creating. Chaos and crashlooping ensured.
y
is that 1.40?
the issue you're describing is something that we've seen recently and have been working to address
i don't remember where we fixed it, though
let me get back to you
m
Yeah. It was the new index for expiring relationships.
My current workflow is to run migrations and then call "serve" on each pod that comes up.
y
if you have the option to use the operator, it will take care of that for you
but i'm asking about what we did for the multiple migrations problem
m
I don't think I can, given our tooling.
y
i was misremembering 😓 the problem you're describing is basically the reason we built the operator, though
are you running them as an initcontainer?
what environment is this in?
m
Kubernetes
But with an organization custom set of tooling around it. It may be possible. It may not.
I'll have to check with the teams running that stuff.
y
makes sense
6 Views