consequences of changing mysql storage engine while application is running in production

强颜欢笑 提交于 2019-12-02 05:41:21

Any change you make with ALTER TABLE that requires a table-copy will lock the table. This is the most significant issue for applications. The table will be inaccessible from queries by any application.

How long this lock lasts depends on the size of the table, and the performance of your server, and the other load the server is under.

You can make changes with minimal downtime if you use an online schema change tool like pt-online-schema-change.

Another strategy is to make alterations to tables on a replica database instance. It's okay for tables to have a different storage engine on a replica than on the master. You don't care about tables being locked, it will just make replication lag behind and then when the alterations are done, replication should catch up. When that's all done, you can switch your application to use the replica, and then decommission the former master database instance.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!