Closed extem closed 4 years ago
Hello Hiroyuki, I've pushed a commit to add this missing feature. Can you let me know if it works? I can't seem to easily write a test case for it.
Thank you for your support!
I downloaded and tested it. gem 'nobrainer', :path=>".......Downloads/nobrainer-master" bundle install
Sample that adds nonvoting_replica to all tables.
ex)
options = { shards: 1, replicas: { main_db_server: 1, sub1_db_server: 1}, primary_replica_tag: 'main_db_server', nonvoting_replica_tags:[sub1_db_server] }
NoBrainer::System::TableStatus.to_a.each do |table|
NoBrainer.run do |r|
r.db(table.db).table(table.name).reconfigure(options)
end
end
It worked perfectly!
Nonvoting_replica is useful during development because it works even when it becomes a single primary replica.
Super, I'll make a release
Is it possible to support "nonvoting_replica_tags" as an option for table_config?
NoBrainer is a very nice library. It works perfectly with Rails6. Thank you very much.