From 3fbbd4de177fc95fbfc5acb730c16db3fb9bd6e7 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Thu, 4 May 2017 10:17:41 -0400 Subject: [PATCH] online schema change: remove per-shard prompting --- plugins/online_schema_change/lib/topology.rb | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/plugins/online_schema_change/lib/topology.rb b/plugins/online_schema_change/lib/topology.rb index 8cbf5bf..97dd5fe 100644 --- a/plugins/online_schema_change/lib/topology.rb +++ b/plugins/online_schema_change/lib/topology.rb @@ -12,8 +12,6 @@ def alter_table_shards(database, table, alter, dry_run=true, shard_pool=nil, ski ui = PreflightShardUI.new(my_shards) ui.run! do |shard,stage| - force_confirm_each_shard(shard) if stage == :all - # If we're past preflight, we want to not prompt the confirmation. force = stage == :all shard.alter_table(database, table, alter, dry_run, force, skip_rename, arbitrary_options) @@ -30,7 +28,6 @@ def drop_old_alter_table_shards(database, table, shard_pool = nil) ui = PreflightShardUI.new(my_shards) ui.run! do |shard,_| - force_confirm_each_shard(shard) if stage == :all shard.drop_old_alter_table(database, table) end end @@ -41,18 +38,10 @@ def rename_table_shards(database, orig_table, copy_table, shard_pool=nil) ui = PreflightShardUI.new(my_shards) ui.run! do |shard,stage| - force_confirm_each_shard(shard) if stage == :all - # If we're past preflight, we want to not prompt the confirmation. force = stage == :all shard.rename_table(database, orig_table, copy_table, force) end end - - def force_confirm_each_shard(shard) - while !agree("Continue on to #{shard.pool.to_s}? Not agreeing will leave the shard pool in an inconsistent state. (YES/no)") - output "It is non-sensical to stop now :( Please say yes, or Ctrl-C if you really mean it." - end - end end end