I have the following MySQL RoR Migrations:
class ReindexRpushNotification < ActiveRecord::Migration
def up
execute("DROP INDEX `index_rpush_notifications_multi` ON rpush_notifications;")
execute("ALTER TABLE rpush_notifications ADD INDEX index_rpush_notifications_multi (delivered, failed, processing, deliver_after), ALGORITHM=INPLACE, LOCK=NONE;")
end
def down
execute("DROP INDEX `index_rpush_notifications_multi` ON rpush_notifications;")
execute("ALTER TABLE rpush_notifications ADD INDEX index_rpush_notifications_multi (delivered, failed), ALGORITHM=INPLACE, LOCK=NONE;")
end
end
during this migration I'm trying to perform some requests (GET, COUNT, DELETE, UPDATE) but nothing work, all these requests just wait
I found an info about index creation in background here
https://stackoverflow.com/a/36064200
http://dev.mysql.com/doc/refman/5.6/en/innodb-create-index-overview.html
but it doesn't work for us
Did anybody try LOCK=NONE?
We use MySQL 5.6.23 on AWS RDS