What's Changed
Added
- Added read-replica (primary/secondary) support to the MySQL datastore backend, matching the existing PostgreSQL behaviour. Configure a secondary connection via
--datastore-secondary-uri(orOPENFGA_DATASTORE_SECONDARY_URI); all reads except those requestingHIGHER_CONSISTENCYare routed to the replica while all writes remain on the primary.GetStore,ListStores,ReadAssertions,ReadAuthorizationModel,ReadAuthorizationModels,FindLatestAuthorizationModel, andReadChangesalways hit the replica when configured regardless of requested consistency — callers should be aware of read-after-write risk on a lagging replica. Seepkg/storage/mysql/mysql.go. Breaking:mysql.NewWithDBgained a requiredsecondaryDB *sql.DBparameter (passnilif no replica is configured);sqlcommon.ReadAuthorizationModelandsqlcommon.FindLatestAuthorizationModelwere removed and moved to per-backend implementations. #3290 Thanks @chiragsoni-eternal for the contribution!
Changed
Fixed
ReadUserTuplenow returns the tuple's timestamp for the Postgres, MySQL, and SQLite datastores; it previously returned a zero timestamp because the query did not selectinserted_at. #3194 Thanks @nikolauspschuetz for the contribution!
Security
- Updated google.golang.org/grpc to v1.83.2 to resolve GO-2026-6443. #3317
New Contributors
- @chiragsoni-eternal made their first contribution in https://github.com/openfga/openfga/pull/3290
- @nikolauspschuetz made their first contribution in https://github.com/openfga/openfga/pull/3194
Full Changelog: https://github.com/openfga/openfga/compare/v1.21.0...v1.22.0