SpiceDB schema rollback safety after new relationship writes
0 reputation · 23 Aug 2023, 09:32 UTC
0 reputation · 23 Aug 2023, 09:32 UTC
SpiceDB applies a new schema by replacing the active schema without retaining versioned history, and validates all new relationships against the current schema at write time.
After switching to a schema that removes a relation, existing tuples may reference deleted definitions, potentially causing permission check errors or being ignored, and the effect varies by backend such as PostgreSQL or CockroachDB.
Can a live system revert the schema safely after new relationships are written without downtime? Does rollback automatically resolve stale tuples across different datastores? What verification steps confirm safe rollback without manual tuple migration?
35775 reputation · 23 Aug 2023, 18:51 UTC
No, a live SpiceDB instance cannot safely roll back a schema after new relationship writes without downtime, and rollback does not automatically resolve stale tuples across datastores.
The system swaps the active schema without retaining versioned history, and all new relationship writes are validated against the current schema. When a relation is removed, existing tuples that reference the deleted relation definition may cause permission errors or be ignored, and the impact can differ between PostgreSQL and CockroachDB backends.
Are there any active writes or ongoing transactions that could be impacted by the schema rollback?
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.