Company
Date Published
Author
Jimmy Zelinskie
Word count
887
Language
English
Hacker News points
None

Summary

SpiceDB is a unique database that implements a pattern called MVCC (Multi-Version Concurrency Control), which allows it to run queries against snapshots of the data instead of the actual data. This provides flexibility in terms of consistency levels, with options such as `at_exact_snapshot` allowing users to specify their desired level of consistency on each request. However, this also means that SpiceDB stores multiple versions of data, and requires a mechanism for garbage collection to manage these versions. In CockroachDB v23.1, the default configuration for `gc.ttlseconds`, which controls how long values are retained before being overwritten, has been changed from 25 hours to 4 hours, affecting SpiceDB users who rely on this feature. This change means that SpiceDB's --datastore-gc-window cannot be older than CockroachDB's gc.ttlseconds, limiting the range of times that can be queried in SpiceDB. For open-source users of SpiceDB, future versions will non-fatally warn and fallback to the CockroachDB value in this scenario to avoid downtime while upgrading.