暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

mysql Tagging ReplicaSets

原创 忘忧草 2022-08-23
259

Tagging is supported by ReplicaSets, and their instances. For the purpose of tagging, ReplicaSets support the setOption(), setInstanceOption() and options() operations. These operations function in generally the same way as their Cluster equivalents. For more information, see Section 6.9, “Tagging Metadata”. This section documents the differences in working with tags for ReplicaSets.

Important
There are no other options which can be configured for ReplicaSets and their instances. For ReplicaSets, the options documented at Section 7.5.1, “Setting Options for InnoDB Cluster” are not supported. The only supported option is the tagging described here.

The ReplicaSet.options() operation shows information about the tags assigned to individual ReplicaSet instances as well as to the ReplicaSet itself.

The option argument of ReplicaSet.setOption() and ReplicaSet.setInstanceOption() only support options with the tag namespace and throw an error otherwise.

The ReplicaSet.setInstanceOption(instance, option, value) and ReplicaSet.setOption(option, value) operations behave in the same way as the Cluster equivalent operations.

There are no differences in hiding instances as described at Removing Instances from Routing. For example, to hide the ReplicaSet instance rs-1, issue:

mysql-js> myReplicaSet.setInstanceOption(“icadmin@rs-1:3306”, “tag:_hidden”, true);
A MySQL Router that has been bootstrapped against the ReplicaSet detects the change and removes the rs-1 instance from the routing destinations.

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论