Repository navigation
ateapi: add persistence compat with MySQL/Vitess in addition to Postgres - #2163
Closed
Ricardo Nunez (ricardonunez-io) wants to merge 44 commits into
Closed
Ricardo Nunez (ricardonunez-io) wants to merge 44 commits into
Ricardo Nunez (ricardonunez-io) wants to merge 44 commits into
Conversation
…ch postgres pool defaults
… instead of a counter row
…ore closely in atemy
…make the mysql init lock cancelable
…s and trim mysql docs
…er without deadlocking
… tidy authz tests
…ow-value mysql tests
…onnectWithRetries
Author
|
Split into a stack of smaller PRs, meant to be merged in order:
Each PR targets |
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.
Set
ATE_API_STORE_BACKEND=mysql(or--store-backend=mysql) to use MySQL 8.0 or later. The newatemystore uses only features that PlanetScale's Vitess supports as a subset of MySQL, meaning all MySQL 8.x+ deployments, Vitess deployments, or PlanetScale deployments are now supported.PostgreSQL stays the default.
atemyimplements the same store interface asatepg, with its own migrations. Shared code (page tokens, leases, the migration runner, worker events) moved intostoresql. Tests that covered both backends moved intostorecontract.AUTO_INCREMENTseq, so they do not serialize on a counter row. The watch tracks seq gaps and probes stale ones to detect rolled-back writes.auto_increment_increment != 1, or a non-strictsql_mode.ate-setup,hack/install-ate.sh, and the ateapi manifest accept MySQL DSNs and TLS file paths. No MySQL server is bundled.ATE_TEST_STORE_BACKEND=mysql.TestVitessrunsatemyagainst vttestserver, and the step fails if that test does not run.hack/verify/mysql-migrations.shkeeps merged migrations immutable.docs/mysql.mdcovers setup, TLS, pool sizing, PlanetScale limits, and behavior that differs from PostgreSQL.docs/dev/postgresql-schema-evolution.mdis nowdocs/dev/schema-evolution.mdand covers both backends.Note
About 29.4k lines in this PR are third-party generated code: 16.2k in _LICENSES/ and 13.2k in vendor/.
Breaking changes
--postgres-pool-max-connsandATE_API_POSTGRES_POOL_MAX_CONNSare replaced by--store-pool-max-connsandATE_API_STORE_POOL_MAX_CONNS. The new setting applies to either backend. Deployments that set the old variable must rename it. Otherwise the pool falls back to the default size.