spicedb icon indicating copy to clipboard operation
spicedb copied to clipboard

make spanner changelog stream retention configurable

Open vroldanbet opened this issue 2 years ago • 2 comments
trafficstars

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.

vroldanbet avatar Jul 26 '23 10:07 vroldanbet

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?

josephschorr avatar Aug 04 '23 21:08 josephschorr

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?

vroldanbet avatar Aug 17 '23 11:08 vroldanbet