Open
Conversation
Contributor
|
@jsha, this PR appears to contain configuration and/or SQL schema changes. Please ensure that a corresponding deployment ticket has been filed with the new values. |
1 similar comment
Contributor
|
@jsha, this PR appears to contain configuration and/or SQL schema changes. Please ensure that a corresponding deployment ticket has been filed with the new values. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In order to exercise sharding logic in Vitess, we need our integration test environment to use sharded keyspaces, which means we need to use vindexes. This PR enables vindexes and changes DB initialization in support. It does not yet shard the keyspaces since doing so causes some consistency issues I still need to debug.
DB initialization changes:
boulder_sa/boulder_sa_next. This allows the two to coexist, which means we don't need todown --volumesthebmariadbcontainer when running locally and switching from./tn.shto./t.sh.bmariadbimage has support for applying SQL schemas from a directory. Use that. Thevttestserverhas support for applying SQL schemas and vschemas from a directory.Foreign keys: we had one foreign key constraint (
serials.registrationID->registrations), but we probably don't actually want this in the Vitess world. It makes things more complicated with no benefit. I removed it from the SQL schemas.test/db.go: Invttestserverwe can't delete more than 10k rows, so I changeddeleteEverythingInAllTablesto delete in a loop. Incidentally I cleaned up some stuff about foreign keys and1 = 1that is no longer needed. Also, I changed deletion calls insa_test.goto use the shared deletion functions.Deletion from
overrideswas failing under this setup withError 1105 (HY000): VT09015: schema tracking required. I concluded this was because the table had no primary key. I changed itsUNIQUE KEYto aPRIMARY KEY.test/vars/vars.go: calculate DSNs based on theBOULDER_CONFIG_DIRvariables, to select betweenboulder_saandboulder_sa_next(etc.).