修改 replacement policy 不同的配置项,之前已经定义的内容是需要重新定义吗?
(root@127.0.0.1) [test] 12:18:51> CREATE PLACEMENT POLICY jianplacementpolicy PRIMARY_REGION=“bj” REGIONS=“bj,dl,sz”;
Query OK, 0 rows affected (0.10 sec)
(root@127.0.0.1) [test] 12:18:54> SHOW CREATE PLACEMENT POLICY jianplacementpolicy\G
*************************** 1. row ***************************
Policy: jianplacementpolicy
Create Policy: CREATE PLACEMENT POLICY jianplacementpolicy
PRIMARY_REGION=“bj” REGIONS=“bj,dl,sz”
1 row in set (0.00 sec)
这里修改 jianplacementpolicy 的 followers 配置后,再次show create 会发现之前的region相关信息没有了,这里的这个结果是期望看到的么?
(root@127.0.0.1) [test] 12:19:05> alter PLACEMENT POLICY jianplacementpolicy FOLLOWERS=3;
Query OK, 0 rows affected (0.09 sec)
(root@127.0.0.1) [test] 12:19:33> SHOW CREATE PLACEMENT POLICY jianplacementpolicy\G
*************************** 1. row ***************************
Policy: jianplacementpolicy
Create Policy: CREATE PLACEMENT POLICY jianplacementpolicy
FOLLOWERS=3
1 row in set (0.00 sec)
如果修改时添加完整的定义在show create的时候显示是完整的
(root@127.0.0.1) [test] 12:19:39> alter PLACEMENT POLICY jianplacementpolicy PRIMARY_REGION=“bj” REGIONS=“bj,dl,sz” FOLLOWERS=3;
Query OK, 0 rows affected (0.08 sec)
(root@127.0.0.1) [test] 12:21:44> SHOW CREATE PLACEMENT POLICY jianplacementpolicy\G
*************************** 1. row ***************************
Policy: jianplacementpolicy
Create Policy: CREATE PLACEMENT POLICY jianplacementpolicy
PRIMARY_REGION=“bj” REGIONS=“bj,dl,sz” FOLLOWERS=3
1 row in set (0.00 sec)
是否可以在指定某些placement policy的同时,不需要重复定义之前的内容