cashapp / spirit

Online Schema Change Tool for MySQL 8.0+
Apache License 2.0
114 stars 20 forks source link

Reject read only connections to primary nodes #313

Closed sahilm closed 5 months ago

sahilm commented 5 months ago

So that we recycle the connection if we inadvertently connect to an old primary which is now a read only replica. This behaviour has been observed during blue/green upgrades and failover on AWS Aurora. See also: https://github.com/go-sql-driver/mysql?tab=readme-ov-file#rejectreadonly

Fixes https://github.com/cashapp/spirit/issues/250