spicedb icon indicating copy to clipboard operation
spicedb copied to clipboard

Datastore-specific defaults

Open jakedt opened this issue 2 years ago • 1 comments

Right now in the pkg/cmd/datastore package we have a set of defaults that apply equally to all datastores. Sometimes this is not a single default that works for all datastores. For example, spanner is limited to 100 usersets in the query splittler based on the structural limitations of the datastore. All other implementations can split at ~1k usersets before they start running into query size constraints.

It would make sense to allow some options to let the datastore pick its own default. We should audit our datastore flags to figure out other cases where this may make sense, and then update the pkg/cmd/datastore package accordingly.

jakedt avatar May 18 '22 14:05 jakedt

how to do this?

set the default SplitQueryCount to 0, and the in newPostgresDatastore or newSpannerDatastore ... func, check whethe the SplitQueryCount is 0. if true, set the default value, else use the SplitQueryCount

fearlessfe avatar Apr 14 '23 09:04 fearlessfe