Skip to content

Commit

Permalink
spanner: allow spicedb to run with head or head-1 migration
Browse files Browse the repository at this point in the history
spanner has a 2 phase migration for the last change - spicedb should
be able to run at the first (adding the new changestream) and the latest
(removing the old) without problems. Prior to this change, the DS health
check returned an error if not at the latest schema change.
  • Loading branch information
ecordell committed Mar 5, 2024
1 parent b65ecb1 commit a0bdc87
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/datastore/spanner/spanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ func (sd spannerDatastore) ReadyState(ctx context.Context) (datastore.ReadyState
return datastore.ReadyState{}, err
}

// TODO(jschorr): Remove register-tuple-change-stream once the multi-phase is done.
if version == headMigration || version == "register-tuple-change-stream" {
// TODO: once phased migration is complete, remove the extra allowed version
if version == headMigration || version == "register-combined-change-stream" {
return datastore.ReadyState{IsReady: true}, nil
}

Expand Down
Loading

0 comments on commit a0bdc87

Please sign in to comment.