spicedb
spicedb copied to clipboard
make spanner changelog stream retention configurable
The SpiceDB Datastore implementation for Spanner now uses changelogs as of version 1.23.0 instead of its own bookkeeping changelog table. The migration used the default retention of 1 day. This is enough for most users, but some may want to change this. Spanner supports up to 7 days of data retention.
So this raises an interesting question: The change stream is created via one of the migrations, but the retention period is configured in the same statement... so it would have to be a flag on the migrate call, and it would only be applicable once.
Any thoughts on how to make this devex better?
there is already a precedent of leaving certain DB configuration flags outside of migrate, like cockroach_cluster_gc_window_nanos. We can either have folks change that themselves or we could introduce support for migration revision-specific options. Not a fan of it though, would have to be pushed to the operator too, and require folks to edit CRs to add the specific options they want to be passed to the corresponding migration. Thoughts / other ideas @ecordell?