This is an automated email from the ASF dual-hosted git repository.
menghaoran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 4183af9 Adjust register center status persist structure for document
(#12947)
4183af9 is described below
commit 4183af90561f53f9c696aa8ae02e5e870c1c40e9
Author: zhaojinchao <[email protected]>
AuthorDate: Fri Oct 8 21:32:15 2021 +0800
Adjust register center status persist structure for document (#12947)
* Adjust register center status persist structure
* update
---
.../governance/management/registry-center.cn.md | 36 +++++++++++++---------
.../governance/management/registry-center.en.md | 34 +++++++++++---------
2 files changed, 41 insertions(+), 29 deletions(-)
diff --git
a/docs/document/content/features/governance/management/registry-center.cn.md
b/docs/document/content/features/governance/management/registry-center.cn.md
index f6d54bb..78a5a8d 100644
--- a/docs/document/content/features/governance/management/registry-center.cn.md
+++ b/docs/document/content/features/governance/management/registry-center.cn.md
@@ -15,7 +15,7 @@ weight = 1
## 注册中心数据结构
-在定义的命名空间下, `rules` 、 `props` 和 `metadata` 节点以 YAML 格式存储配置,可通过修改节点来实现对于配置的动态管理。
`states` 存储数据库访问对象运行节点,用于区分不同数据库访问实例。
+在定义的命名空间下,`rules` 、`props` 和 `metadata` 节点以 YAML
格式存储配置,可通过修改节点来实现对于配置的动态管理。`status` 存储数据库访问对象运行节点,用于区分不同数据库访问实例。
```
namespace
@@ -32,17 +32,23 @@ namespace
├ ├ ├──schema # 表结构配置
├──status
├ ├──compute_nodes
- ├ ├ ├──${your_instance_ip_a}@${your_instance_pid_x}@${UUID}
- ├ ├ ├──${your_instance_ip_b}@${your_instance_pid_y}@${UUID}
- ├ ├ ├──....
+ ├ ├ ├──online
+ ├ ├ ├ ├──${your_instance_ip_a}@${your_instance_port_x}
+ ├ ├ ├ ├──${your_instance_ip_b}@${your_instance_port_y}
+ ├ ├ ├ ├──....
+ ├ ├ ├──circuit_breaker
+ ├ ├ ├ ├──${your_instance_ip_c}@${your_instance_port_v}
+ ├ ├ ├ ├──${your_instance_ip_d}@${your_instance_port_w}
+ ├ ├ ├ ├──....
├ ├──storage_nodes
- ├ ├ ├──${schema_1}
- ├ ├ ├ ├──${ds_0}
- ├ ├ ├ ├──${ds_1}
- ├ ├ ├──${schema_2}
- ├ ├ ├ ├──${ds_0}
- ├ ├ ├ ├──${ds_1}
- ├ ├ ├──....
+ ├ ├ ├──disable
+ ├ ├ ├ ├──${schema_1.ds_0}
+ ├ ├ ├ ├──${schema_1.ds_1}
+ ├ ├ ├ ├──....
+ ├ ├ ├──primary
+ ├ ├ ├ ├──${schema_2.ds_0}
+ ├ ├ ├ ├──${schema_2.ds_1}
+ ├ ├ ├ ├──....
```
### /rules
@@ -147,7 +153,7 @@ tables: # 表
### /status/compute_nodes
数据库访问对象运行实例信息,子节点是当前运行实例的标识。
-运行实例标识由运行服务器的 IP 地址和 PID 构成。运行实例标识均为临时节点,当实例上线时注册,下线时自动清理。
+运行实例标识由运行服务器的 IP 地址和 PORT 构成。运行实例标识均为临时节点,当实例上线时注册,下线时自动清理。
注册中心监控这些节点的变化来治理运行中实例对数据库的访问等。
### /status/storage_nodes
@@ -162,12 +168,12 @@ tables: # 表
### 熔断实例
-可在 `IP地址@PID@UUID` 节点写入 `DISABLED`(忽略大小写)表示禁用该实例,删除 `DISABLED` 表示启用。
+可在 `IP地址@PORT` 节点写入 `DISABLED`(忽略大小写)表示禁用该实例,删除 `DISABLED` 表示启用。
Zookeeper 命令如下:
```
-[zk: localhost:2181(CONNECTED) 0] set
/${your_zk_namespace}/status/compute_nodes/${your_instance_ip_a}@${your_instance_pid_x}@${UUID}
DISABLED
+[zk: localhost:2181(CONNECTED) 0] set
/${your_zk_namespace}/status/compute_nodes/circuit_breaker/${your_instance_ip_a}@${your_instance_port_x}
DISABLED
```
### 禁用从库
@@ -177,5 +183,5 @@ Zookeeper 命令如下:
Zookeeper 命令如下:
```
-[zk: localhost:2181(CONNECTED) 0] set
/${your_zk_namespace}/status/storage_nodes/${your_schema_name}/${your_replica_datasource_name}
DISABLED
+[zk: localhost:2181(CONNECTED) 0] set
/${your_zk_namespace}/status/storage_nodes/disable/${your_schema_name.your_replica_datasource_name}
DISABLED
```
diff --git
a/docs/document/content/features/governance/management/registry-center.en.md
b/docs/document/content/features/governance/management/registry-center.en.md
index c98eb94..6331f23 100644
--- a/docs/document/content/features/governance/management/registry-center.en.md
+++ b/docs/document/content/features/governance/management/registry-center.en.md
@@ -32,17 +32,23 @@ namespace
├ ├ ├──schema # Table configuration
├──status
├ ├──compute_nodes
- ├ ├ ├──${your_instance_ip_a}@${your_instance_pid_x}@${UUID}
- ├ ├ ├──${your_instance_ip_b}@${your_instance_pid_y}@${UUID}
- ├ ├ ├──....
+ ├ ├ ├──online
+ ├ ├ ├ ├──${your_instance_ip_a}@${your_instance_port_x}
+ ├ ├ ├ ├──${your_instance_ip_b}@${your_instance_port_y}
+ ├ ├ ├ ├──....
+ ├ ├ ├──circuit_breaker
+ ├ ├ ├ ├──${your_instance_ip_c}@${your_instance_port_v}
+ ├ ├ ├ ├──${your_instance_ip_d}@${your_instance_port_w}
+ ├ ├ ├ ├──....
├ ├──storage_nodes
- ├ ├ ├──${schema_1}
- ├ ├ ├ ├──${ds_0}
- ├ ├ ├ ├──${ds_1}
- ├ ├ ├──${schema_2}
- ├ ├ ├ ├──${ds_0}
- ├ ├ ├ ├──${ds_1}
- ├ ├ ├──....
+ ├ ├ ├──disable
+ ├ ├ ├ ├──${schema_1.ds_0}
+ ├ ├ ├ ├──${schema_1.ds_1}
+ ├ ├ ├ ├──....
+ ├ ├ ├──primary
+ ├ ├ ├ ├──${schema_2.ds_0}
+ ├ ├ ├ ├──${schema_2.ds_1}
+ ├ ├ ├ ├──....
```
### /rules
@@ -146,7 +152,7 @@ tables: # Tables
### /status/compute_nodes
-It includes running instance information of database access object, with
sub-nodes as the identifiers of currently running instance, which consist of IP
and PID. Those identifiers are temporary nodes, which are registered when
instances are on-line and cleared when instances are off-line. The registry
center monitors the change of those nodes to govern the database access of
running instances and other things.
+# It includes running instance information of database access object, with
sub-nodes as the identifiers of currently running instance, which consist of IP
and PORT. Those identifiers are temporary nodes, which are registered when
instances are on-line and cleared when instances are off-line. The registry
center monitors the change of those nodes to govern the database access of
running instances and other things.
### /status/storage_nodes
@@ -160,12 +166,12 @@ Modification, deletion and insertion of relevant
configurations in the config ce
### Circuit Breaker
-Write `DISABLED` (case insensitive) to `IP@PID@UUID` to disable that instance;
delete `DISABLED` to enable the instance.
+Write `DISABLED` (case insensitive) to `IP@PORT` to disable that instance;
delete `DISABLED` to enable the instance.
Zookeeper command is as follows:
```
-[zk: localhost:2181(CONNECTED) 0] set
/${your_zk_namespace}/status/compute_nodes/${your_instance_ip_a}@${your_instance_pid_x}@${UUID}
DISABLED
+[zk: localhost:2181(CONNECTED) 0] set
/${your_zk_namespace}/status/compute_nodes/circuit_breaker/${your_instance_ip_a}@${your_instance_port_x}
DISABLED
```
### Disable Replica Database
@@ -175,5 +181,5 @@ Under replica query scenarios, users can write `DISABLED`
(case insensitive) to
Zookeeper command is as follows:
```
-[zk: localhost:2181(CONNECTED) 0] set
/${your_zk_namespace}/status/storage_nodes/${your_schema_name}/${your_replica_datasource_name}
DISABLED
+[zk: localhost:2181(CONNECTED) 0] set
/${your_zk_namespace}/status/storage_nodes/disable/${your_schema_name.your_replica_datasource_name}
DISABLED
```