Skip to content

Commit ad92255

Browse files
committed
Update 1.10_version_change.md
1 parent 0eeec82 commit ad92255

File tree

2 files changed

+177
-257
lines changed

2 files changed

+177
-257
lines changed

1.config_file/1.10_version_change.md

Lines changed: 177 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
## 1.10 版本变更
2+
3+
+ [3.21.06.0](#config-title-3.21.06.0)
4+
- [配置文件版本变更](#sequence-insert-3.21.06.0)
5+
- [集群中存储格式调整](#cluster-update-3.21.06.0)
6+
- [日志类管理端命令删除](#deleted-manager-cmd-3.21.06.0)
7+
- [dble_thread_pool表结构调整](#update-thread-pool-3.21.06.0)
8+
+ [3.21.02.0](#config-title-3.21.02.0)
9+
- [集群中sequence结构调整](#sequence-update-3.21.02.0)
10+
- [配置文件验证方式调整](#xml-valid-update-3.21.02.0)
11+
- [配置文件版本变更](#config-updat-3.21.02.0)
12+
+ [3.20.07.0](#config-title-3.20.07.0)
13+
- [配置文件版本变更](#config-update-3.20.07.0)
14+
15+
***
16+
### <span id="config-title-3.21.06.0">3.21.06.0 变更内容</span>
17+
#### <span id="sequence-insert-3.21.06.0">1 dble的配置文件版本变更</span>
18+
##### 1.1 bootstrap.cnf
19+
120
<table>
221
<tbody>
322
<tr>
@@ -21,60 +40,175 @@
2140
</tbody>
2241
</table>
2342

24-
<table class="confluenceTable">
43+
44+
###### inSubQueryTransformToJoin
45+
原来:如果sql中存在in子查询并且满足可以转join的条件,在dble中会默认将in子查询转成join处理
46+
更改后:在默认情况下,不会将in子查询转成join处理,而是正常按照子查询处理。如果需要将in子查询转成join处理,请在bootstrap.cnf增加该参数(-DinSubQueryTransformToJoin=true)
47+
具体说明请参考:[inSubQueryTransformToJoin](../A.Faq/ErrorCode/Content/inSubQueryTransformToJoin.md)
48+
49+
###### enableCursor:
50+
51+
原来:老版本是只需要 client 显式开启即可使用游标。
52+
53+
现在: 新版本游标功能变成需要client 和 server 同时显式开启才能使用,server 默认不开启。
54+
55+
升级模式:通常不需要这个功能,如果确实需要可以开启。需注意开启会导致所有的prepared statement牺牲一部分性能,用于查询列的数量,详情见 【4.4 prepared statement】.
56+
57+
##### 1.2 sharding.xml
58+
59+
<table>
2560
<tbody>
2661
<tr>
27-
<th class="confluenceTh">名称</th>
28-
<th class="confluenceTh"><strong>内容</strong></th>
29-
<th class="confluenceTh"><strong>默认值</strong></th>
30-
<th class="confluenceTh"><strong>详细作用原理或应用</strong></th>
31-
<th class="confluenceTh"><strong>实例/全局属性</strong></th>
32-
</tr>
33-
<tr>
34-
<td >url </td>
35-
<td >grpc告警的url</td>
36-
<td >cluster.cnf 里的clusterIP</td>
37-
<td >在发送grpc的时候作为IP地址使用</td>
38-
<td >实例</td>
39-
</tr>
40-
<tr>
41-
<td >
42-
port
43-
</td>
44-
<td >告警端口</td>
45-
<td >cluster.cnf 里的clusterPort </td>
46-
<td >grpc发送的目的端口</td>
47-
<td ><span>实例</span></td>
62+
<td ><p><strong>变更项</strong></p></td>
63+
<td ><p><strong>变更内容</strong></p></td>
64+
<td ><p><strong>变更版本</strong></p></td>
65+
<td ><p><strong>向后兼容性</strong></p></td>
4866
</tr>
4967
<tr>
50-
<td colspan="1">
51-
serverId
52-
</td>
53-
<td colspan="1">服务器ID</td>
54-
<td colspan="1"><span>$ushard-id(ip1,ip2) ,其中$ushard-id 是bootstrap.cnf 里的instanceName </span></td>
55-
<td colspan="1">接口参数</td>
56-
<td colspan="1"><span>实例</span></td>
68+
<td ><p><strong>修改</strong></p></td>
69+
<td ><p><strong>jumpStringHash中的hashSlice默认值。</strong></p></td>
70+
<td ><p><strong>3.21.06</strong></p></td>
71+
<td ><p><strong>不兼容</strong></p></td>
5772
</tr>
73+
</tbody>
74+
</table>
75+
76+
77+
78+
原来:如果不设置hashSlice, 之前版本默认值是(0:-1),不是一个很好的默认值,会丢失一个字符的计算。具体见文档【1.5】中关于 stringhash 的介绍
79+
80+
现在: 3.21.06改为了默认值(0:0)
81+
82+
升级模式:需检查jumpStringHash 的 hashSlice是否有配置,如果原本没有配置需要配置为(0:-1)。
83+
84+
#### <span id="cluster-update-3.21.06.0">2 集群中存储格式调整</span>
85+
86+
dble在3.21.06.0版本对集群的存储格式进行了调整
87+
88+
原有: 配置中心(zk)存储value的格式不尽相同,且不具备向后兼容性
89+
90+
更改后: 配置中心(zk)存储value的格式均改成了json 格式。并且在在外层包裹了一个统一的格式。
91+
具体格式如下:
92+
```json
93+
{
94+
"instanceName": "1", //bootstrap.cnf 里面的instanceName
95+
"apiVersion": 1, //为了兼容性增加的版本字段
96+
"createdAt": 1628669627058, //创建这个节点的时间戳(毫秒)
97+
"data": { } //具体数据以 json 格式存储在这里
98+
}
99+
```
100+
101+
升级方式: 由于两者的元数据互不兼容,升级前需停止旧版本 dble,然后删除配置中心中当前集群的所有元数据,即删除目录"`/{rootPath}/{clusterId}`",再启动新版本。如需缩短不可用的时间,新版本可以使用不同的clusterId,即启动一个和旧版本隔离的全新集群。
102+
> 注意:
103+
>
104+
> rootPath和clusterId 的对应值见 cluster.cnf
105+
>
106+
> 如果不删除,升级会导致dble 无法启动,并报错 "you may use old incompatible metadata."
107+
>
108+
> 降级方式:同升级。
109+
110+
#### <span id="deleted-manager-cmd-3.21.06.0">3 日志类管理端命令删除</span>
111+
删除以下管理端命令:
112+
1. log @@[file=logname limit=numberOfRow key=keyword regex=regex]
113+
2. show @@syslog limit=?
114+
3. file @@list
115+
4. file @@show filename
116+
5. file @@upload filename content
117+
118+
#### <span id="update-thread-pool-3.21.06.0">4 dble_thread_pool表结构调整</span>
119+
+ 原有字段size修改为pool_size:表示当前实际线程池的大小
120+
+ 增加字段core_pool_size:表示设置的核心线程池大小
121+
122+
123+
### <span id="config-title-3.21.02.0">3.21.02.0 变更内容</span>
124+
#### <span id="sequence-update-3.21.02.0">1 集群中sequence结构调整</span>
125+
126+
dble在3.21.02.0版本对序列的存储结构进行了调整
127+
128+
原有: 配置中心(zk)存储sequence的结构为key-value形式。key:文件名;value:文件原始内容
129+
130+
更改后: 配置中心(zk)存储sequence的结构为key-value形式。key:文件名;value:文件内容的json形式
131+
132+
升级方式:升级前需删除配置中心的sequence配置(rootPath/clusterId/conf/sequences),存储结构详情见:
133+
[ZK整体目录结构](https://github.com/actiontech/dble-docs-cn/blob/2.20.04.1/tag/2.Function/2.08_cluster.md#286-zk%E6%95%B4%E4%BD%93%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84)
134+
135+
#### <span id="xml-valid-update-3.21.02.0">2 dble的配置文件验证方式调整</span>
136+
137+
在3.21.02.0版本对dble的xml配置文件验证方式调整
138+
139+
原有:使用dtd文件验证xml的格式,dble中使用DocumentBuilder的方式解析xml文件
140+
141+
更改后:使用xsd文件验证xml的格式,dble中使用jaxb2.0方式解析xml文件
142+
143+
升级方式:升级前需删除原有xml配置文件中的标签:db.xml中的
144+
```
145+
<!DOCTYPE dble:db SYSTEM "db.dtd">、sharding.xml中的<!DOCTYPE dble:sharding SYSTEM "sharding.dtd">、user.xml中的<!DOCTYPE dble:user SYSTEM "user.dtd">
146+
```
147+
148+
#### <span id="config-updat-3.21.02.0">3 dble的配置文件版本变更</span>
149+
##### 3.1 bootstrap.cnf
150+
151+
<table>
152+
<tbody>
58153
<tr>
59-
<td colspan="1">
60-
componentId
61-
</td>
62-
<td colspan="1">组件ID</td>
63-
<td colspan="1"><span>$ushard-id 即bootstrap.cnf 里instanceName </span></td>
64-
<td colspan="1"><span>接口参数</span></td>
65-
<td colspan="1"><span>实例</span></td>
154+
<td ><p><strong>变更项</strong></p></td>
155+
<td ><p><strong>变更内容</strong></p></td>
156+
<td ><p><strong>变更版本</strong></p></td>
157+
<td ><p><strong>向后兼容性</strong></p></td>
158+
<td ><p><strong>升级方式</strong></p></td>
66159
</tr>
67160
<tr>
68-
<td colspan="1">
69-
componentType
70-
</td>
71-
<td colspan="1">组件类型</td>
72-
<td colspan="1"><span>ushard</span></td>
73-
<td colspan="1"><span>接口参数</span></td>
74-
<td colspan="1"><span>实例</span></td>
161+
<td ><p><strong>变更</strong></p></td>
162+
<td ><p><strong>homePath必须显示声明</strong></p></td>
163+
<td ><p><strong>3.21.02</strong></p></td>
164+
<td ><p><strong>兼容</strong></p></td>
165+
<td ><p><strong>升级前需要将原来在bootstrap.cnf中未声明的homePath,加上-DhomePath=.(路径为当前目录,已声明的无需更改) </strong></p></td>
75166
</tr>
76167
</tbody>
77168
</table>
78169

170+
### <span id="config-title-3.20.07.0">3.20.07.0 变更内容</span>
171+
#### <span id="config-update-3.20.07.0"> 1 配置文件版本变更</span>
172+
173+
dble 在3.20.07.0 版本做了配置的重构。历史变更请参考[2.20.04.0的变更](https://github.com/actiontech/dble-docs-cn/blob/2.20.04.1/tag/1.config_file/1.10_version_change.md)
174+
175+
可以通过升级工具[dble_update_config](pic/dble_update_config)将配置从2.20.04.0 升级到3.20.07.0,如果是更早版本,建议先升级到2.20.04.0
176+
177+
升级工具用法:
178+
179+
```
180+
dble_update_config [-i=read_dir] [-o=write_dir] [-p=rootPath]
181+
```
182+
read_dir/write_dir: 如果不指定,缺省值为当前目录,建议指定或者提前备份配置
183+
rootPath:如果集群模式是zk, 那么缺省值为 `/dble`, 如果集群模式是ucore, 缺省值为`universe/dble`
184+
185+
工具将会读取文件:
186+
myid.properties
187+
wrapper.conf
188+
server.xml
189+
schema.xml
190+
rule.xml
191+
log4j2.xml
192+
cacheservice.properties(option)
193+
sequence_distributed_conf.properties for type3 (option)
194+
sequence_time_conf.properties for type2 (option)
195+
196+
然后写出文件:
197+
cluster.cnf
198+
bootstrap.cnf
199+
user.xml
200+
db.xml
201+
sharding.xml
202+
log4j2.xml
203+
cacheservice.properties(option)
204+
205+
206+
重构后的配置概览图:
207+
![配置概览图](pic/3.20.07.0_config.png)
208+
209+
***
210+
211+
212+
79213

80214

0 commit comments

Comments
 (0)