美文网首页开源分布式中间件DBLE
分布式 | DBLE 3.20.07.0 来啦!

分布式 | DBLE 3.20.07.0 来啦!

作者: 爱可生开源社区 | 来源:发表于2020-08-31 15:41 被阅读0次

    3.20.07.0 版本 DBLE Release Notes

    以下对 DBLE 3.20.07.0 版本的 Release Notes 进行详细解读。
    文章主要分为以下三部分内容:
    一、DBLE 项目介绍
    二、新版本主要更新解读
    三、完整 Release Notes 及翻译

    https://github.com/actiontech/dble

    一、DBLE 项目介绍

    DBLE 是企业级开源分布式中间件,江湖人送外号 “MyCat Plus”;以其简单稳定,持续维护,良好的社区环境和广大的群众基础得到了社区的大力支持;

    官方课程:

    Tips:建议下载最新的 Releases 版本,下载 tar 压缩包即可,如有源码编译需求的,可以下载源码包。

    二、新版本主要更新解读

    DBLE 3.20.07.0 已于今日发布,这是今年 DBLE 第三次发版,感慨上一次还是在 5 月 19 日。相信接下来的发版频率会逐渐恢复正常。

    新版 DBLE 新增重构功能 6 个,修复缺陷 16 个,向后兼容性调整 1 处;

    致谢:

    • 首先,我们必须感谢以下人士对我们社区的贡献:@dairight, @z3093964447
    • 感谢 Github 用户提供的优质 issue,star 接近 700!
    • 感谢 QQ 群(669663113)内朋友提供的有效反馈,群用户数突破千人!

    主要更新:

    1、配置文件重构!!!

    可以通过升级工具 dble_update_config 将配置从 2.20.04.0 升级到 3.20.07.0,如果是更早版本,建议先升级到 2.20.04.0。

    升级工具用法:

    dble_update_config [-i=read_dir] [-o=write_dir] [-p=rootPath]
    

    read_dir/write_dir:如果不指定,缺省值为当前目录,建议指定或者提前备份配置 rootPath:如果集群模式是 zk,那么缺省值为 /dble,如果集群模式是 ucore,缺省值为 universe/dble。

    工具将会读取文件:

    • myid.properties
    • wrapper.conf
    • server.xml
    • schema.xml
    • rule.xml
    • log4j2.xml
    • cacheservice.properties(option)
    • sequence_distributed_conf.properties for type3 (option)
    • sequence_time_conf.properties for type2 (option)

    然后写出文件:

    • cluster.cnf
    • bootstrap.cnf
    • user.xml
    • db.xml
    • sharding.xml
    • log4j2.xml
    • cacheservice.properties(option)

    (建议在 PC 端浏览细节)

    2、非拆分表的复杂的 DML 语句支持

    非拆分表的以下四种 DML 语句支持直接下推到 MySQL:

    INSERT ... SELECT

    DELETE... 多表关联

    UPDATE... 多表关联

    另外,拆分规则相同的表格也会支持 INSERT ... SELECT 等语句

    3、支持在线 DDL

    3.1 背景

    在 3.20.04.0 或之前版本的 DBLE 中执行 DDL,需要加表锁,若是在集群中,也会通知其他 DDL 加上表锁,加锁期间执行对应表的 SQL 会报错。在 DDL 执行结束后,DBLE 会下发 show create table 得到建表语句,得到建表语句后会解析重新生成元数据,集群中的其他 DBLE 也会执行此操作。

    但一部分 SQL 其实对 dble 不造成影响,对 dble 造不造成影响的判断依据在于是否需要更改 dble 中表的元数据,目前 dble 中表的元数据只关心表的列名称,列类型,类是否为 null。若这样的 sql 在 mysql 侧也是 onlineDDL 的,可以无需加锁,直接下发执行,例如增加索引的操作。

    3.2ONLINE DDL 的种类

    以下列举了 MySQL 8.0 中所有的 ONLINE DDL 以及是否在 DBLE 中支持 ONLINE DDL 模式。

    • Index Operations
    • Primary Key Operations
    • Column Operations
    • Generated Column Operations
    • Foreign Key Operations
    • Table Operations
    • Tablespace Operations
    • Partitioning Operations
      详细模式介绍请参考文末【参考 3】

    三、更新日志(Release Notes)

    翻译

    特性:

    • [#1879] 重构连接池的代码
    • [#1863] 支持更多 DML 语句可以被直接将其下推到 MySQL。更多详细信息请参见文末【参考 1】
    • [#1849] 重构配置文件:DBLE 的配置文件有很大变化,更多详细信息请参见文末【参考 2】。如果要将旧的配置(必须为2.20.04.x)升级到新的配置,则可以使用名为“ dble_update_config”的工具。
    • [#1848] 支持在线 DDL。更多详细信息请参见文末【参考 3】
    • [#1846] 通过 WriteToBackendExecutor 在复杂查询中发送查询
    • [#1906] DBLE 支持 OGG 工具进行数据同步(alpha 功能)

    缺陷修复:

    • [#2030] 执行一个复杂的 SQL,其中包含许多并集但会挂起
    • [#2029] 当列名称包含中文时,发生错误“field not found:c.成功一”
    • [#2025] 错误,当 select 中存在常量时
    • [#2022] Round 函数有问题
    • [#2021] 多个联合和子查询后,列顺序不正确
    • [#1977] 不支持管理命令时,需要在日志中打印查询
    • [#1939] 启用 PreparedStatement 后,将对包含 blob,text 等数据类型的表进行多次插入操作;插入的值包含先前 SQL 插入/更新的值。
    • [#1926] 如果分片值是十六进制类型,DBLE 将报告错误或路由到错误的节点
    • [#1913] 当两个 sharding_table inner join 时,查询 DATEDIFF() 结果不同于单表查询 DATEDIFF()
    • [#1820] JDBC 在通过 setblobsetBinaryStream 保存图片时遇到了问题,这要感谢 @z3093964447 报告此错误。
    • [#1814] 当“load data”失败时,临时文件未被删除
    • [#1788] 前端连接超时,可能导致心跳检测失败
    • [#1760] 在 XA 事务中执行 DDL 时污染了 MySQL 连接池
    • [#1701] 期望默认的 XA 日志名称和 XA 日志直接名称包含“ xa”
    • [#1678] show tables 的结果集列名与 MySQL 不符
    • [#1658] 当 tempReadHostAvailable ="1",
      无法正常切换,
      这要感谢 @dairight 报告了该错误

    打破向后兼容性:

    • [#1849] 重构配置文件:DBLE 的配置文件有很大变化,更多详细信息请参见文末【参考 4】。如果要将旧的配置(必须为 2.20.04.x)升级到新的配置,则可以使用名为“ dble_update_config”的工具。

    Release Notes

    Features:

    • [#1879] Refactor code for connection pool
    • [#1863] Support more DML queries which can be pushed down to MySQL directly. More Detail,see 3.SQL_Syntax/3.2_DML
    • [#1849] Refactor config files:There are big changes for config files of dble, More Detail,see 1.00_config_file . If you want to upgrade your old configs(must be 2.20.04.x) to new configs, you can use the tool named dble_update_config. .
    • [#1848] Support online ddl. More Detail,see online_ddl
    • [#1846] send query by WriteToBackendExecutor in complex query
    • [#1906] Supports the tool OGG for data synchronization (alpha)

    Bug-fixes:

    • [#2030] Execute a complex SQL which contains many unions but hang
    • [#2029] Occur error"field not found:c.成功一" when the column name contains Chinese
    • [#2025] Error when there is constant in select
    • [#2022] Round function have problem
    • [#2021] After multiple unions and subqueries, the column order is incorrect
    • [#1977] The query needs to be printed in the log,when management commands not supported
    • [#1939] When PreparedStatement is enabled, multiple insert operations on tables containing data types such as blob、text; the inserted value contains the value of the previous SQL insert/update.
    • [#1926] If sharding value is a hex type,dble will report error or route to the wrong node
    • [#1913] When two sharding_table inner join , the select DATEDIFF() result is different from one table select DATEDIFF()
    • [#1820] JDBC has problems saving pictures via setblob or setBinaryStream , thanks to @z3093964447 for reporting the bug.
    • [#1814] When load data failed,the file:temp was left behind
    • [#1788] Front connect timeout,may cause heartbeat detection to fail
    • [#1760] Contaminate mysql connection pool when doing ddl in xa transaction
    • [#1701] Expect the default xa log name and xa log directoty name contain 'xa'
    • [#1678] Column name of [show tables] resultset is not consistent with mysql
    • [#1658] When tempReadHostAvailable="1",
      show slave status
      not work, thanks to @dairight for reporting the bug.

    Breaking backward compatibility:

    • [#1849] Refactor config files:There are big changes for config files of dble, More Detail,see1.00_config_file . If you want to upguard your old configs(must be 2.20.04.x) to new configs by tool.

    Tips:建议下载最新的 Releases 版本,下载 tar 压缩包即可,如有源码编译需求的,可以下载源码包。我们还发布了几个 bug 修复的小版本 2.19.09.3、 2.19.11.2、2.20.04.2,老版本用户可以考虑小版本升级,风险较低。


    本次的发版报道就到这里啦~

    参考链接:

    【参考 1】3.SQL_Syntax / 3.2_DML
    https://github.com/actiontech/dble-docs-cn/tree/develop/3.SQL_Syntax/3.2_DML

    【参考 2】1.00_config_file
    https://github.com/actiontech/dble-docs-cn/blob/develop/1.config_file/1.00_config_file.md

    【参考 3】3.1.6 ONLINE DDL
    https://github.com/actiontech/dble-docs-cn/blob/develop/3.SQL_Syntax/3.1_DDL/3.1.6_DDL%26online_ddl.md

    【参考 4】1.00_config_file
    https://github.com/actiontech/dble-docs-cn/blob/develop/1.config_file/1.00_config_file.md

    相关文章

      网友评论

        本文标题:分布式 | DBLE 3.20.07.0 来啦!

        本文链接:https://www.haomeiwen.com/subject/xjvusktx.html