Glean
Glean logoGlean · Feature trail

Cloud SQL Migration

1 post · Aug 2026

What this trail covers

Glean has migrated 150 Cloud SQL instances from MySQL 5 to MySQL 8 using GCP DMS. This migration was motivated by MySQL 8's JSON improvements, aiming to speed up operations involving JSON columns. The process involved creating new MySQL 8 instances, copying large datasets (TBs), ensuring source DB availability, and managing service restarts/redeploys. An Asynchronous Upgrade Framework was developed to manage the large scale and duration of these migrations, using a state machine stored in GCS. The framework ensures idempotent operations and allows for state transitions based on replication lag and system load. Early indications show gains in CPU utilization and lower disk I/O with MySQL 8.

All Glean trails