Skip to content

Commit

Permalink
Merge pull request authzed#1738 from josephschorr/datastore-readme
Browse files Browse the repository at this point in the history
Add missing datastore READMEs
  • Loading branch information
vroldanbet committed Feb 5, 2024
2 parents eab34f7 + 2f04a90 commit 5d0eb90
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
9 changes: 9 additions & 0 deletions internal/datastore/mysql/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# MySQL Datastore

**Minimum required version** can be found here defined as `MinimumSupportedMySQLVersion` in [version.go](version/version.go)

This datastore implementation allows you to use a MySQL database as the backing durable storage for SpiceDB.

## Usage Caveats

The MySQL datastore only supports a single primary node, and does not support read replicas. It is therefore only recommended for installations that can scale the MySQL instance vertically and cannot be used efficiently in a mulit-region installation.
6 changes: 6 additions & 0 deletions internal/datastore/mysql/version/version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package version

// MinimumSupportedMySQLVersion is the minimum version of MySQL supported for this driver.
//
// NOTE: must match a tag on DockerHub for the `mysql` image.
const MinimumSupportedMySQLVersion = "8.0"
7 changes: 7 additions & 0 deletions internal/datastore/spanner/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Spanner Datastore

This datastore implementation allows you to use a [Google Cloud Spanner](https://cloud.google.com/spanner) database as the backing durable storage for SpiceDB.

## Usage Benefits

The Spanner datastore, like the CockroachDB datastore, can be used in highly scalable and multi-region installations.
3 changes: 2 additions & 1 deletion internal/testserver/datastore/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/stretchr/testify/require"

"github.com/authzed/spicedb/internal/datastore/mysql/migrations"
"github.com/authzed/spicedb/internal/datastore/mysql/version"
"github.com/authzed/spicedb/pkg/datastore"
"github.com/authzed/spicedb/pkg/migrate"
"github.com/authzed/spicedb/pkg/secrets"
Expand Down Expand Up @@ -52,7 +53,7 @@ func RunMySQLForTestingWithOptions(t testing.TB, options MySQLTesterOptions, bri
pool, err := dockertest.NewPool("")
require.NoError(t, err)

containerImageTag := "8"
containerImageTag := version.MinimumSupportedMySQLVersion

name := fmt.Sprintf("mysql-%s", uuid.New().String())
resource, err := pool.RunWithOptions(&dockertest.RunOptions{
Expand Down

0 comments on commit 5d0eb90

Please sign in to comment.