From fce2516cb9c3427b7702da215c8663f78f27d744 Mon Sep 17 00:00:00 2001 From: yangj1211 <153493538+yangj1211@users.noreply.github.com> Date: Fri, 29 Dec 2023 13:04:39 +0800 Subject: [PATCH] update main branch (#913) * add doc of lcase/ucase * add doc of architecture-wal * update doc of save_query_result * update release-notes * update version --- .../How-to-Contribute/preparation.md | 2 +- .../Deploy/deploy-MatrixOne-cluster.md | 2 +- .../Deploy/update-MatrixOne-cluster.md | 2 +- .../Computing-Engine/DataX-write.md | 2 +- .../Computing-Engine/Flink.md | 2 +- .../Computing-Engine/Spark.md | 2 +- .../Computing-Engine/seatunnel-write.md | 2 +- .../connect-mo/configure-mo-ssl-connection.md | 2 +- .../connect-mo/database-client-tools.md | 2 +- .../connect-mo/python-connect-to-matrixone.md | 2 +- .../Develop/import-data/bulk-load/load-csv.md | 2 +- .../import-data/bulk-load/using-source.md | 2 +- .../auto-increment-integrity.md | 4 +- .../data-integrity/foreign-key-constraints.md | 6 +- .../install-on-linux-method1.md | 8 +- .../install-on-linux-method2.md | 20 +- .../install-on-linux-method3.md | 12 +- .../install-on-macos-method1.md | 8 +- .../install-on-macos-method2.md | 20 +- .../install-on-macos-method3.md | 12 +- docs/MatrixOne/Maintain/mo_ctl.md | 16 +- .../Maintain/mount-data-by-docker.md | 8 +- .../migrate-from-mysql-to-matrixone.md | 2 +- .../Overview/architecture/architecture-wal.md | 227 ++++++++++++++++++ .../Overview/feature/feature-overview.md | 2 +- .../Overview/matrixone-feature-list.md | 2 +- docs/MatrixOne/Overview/whats-new.md | 4 +- .../through-partition/through-partition-by.md | 2 +- .../Functions-and-Operators/String/lcase.md | 37 +++ .../Functions-and-Operators/String/ucase.md | 37 +++ .../system-variables/save_query_result.md | 198 +++++++++++++-- .../Release-Notes/release-timeline.md | 2 + docs/MatrixOne/Release-Notes/v1.0.1.md | 43 ++++ docs/MatrixOne/Release-Notes/v1.0.2.md | 32 +++ docs/MatrixOne/Security/TLS-introduction.md | 4 +- mkdocs.yml | 5 + 36 files changed, 641 insertions(+), 94 deletions(-) create mode 100644 docs/MatrixOne/Overview/architecture/architecture-wal.md create mode 100644 docs/MatrixOne/Reference/Functions-and-Operators/String/lcase.md create mode 100644 docs/MatrixOne/Reference/Functions-and-Operators/String/ucase.md create mode 100644 docs/MatrixOne/Release-Notes/v1.0.1.md create mode 100644 docs/MatrixOne/Release-Notes/v1.0.2.md diff --git a/docs/MatrixOne/Contribution-Guide/How-to-Contribute/preparation.md b/docs/MatrixOne/Contribution-Guide/How-to-Contribute/preparation.md index 291055f4ce..41febe73f2 100644 --- a/docs/MatrixOne/Contribution-Guide/How-to-Contribute/preparation.md +++ b/docs/MatrixOne/Contribution-Guide/How-to-Contribute/preparation.md @@ -15,7 +15,7 @@ ### 建设情况 -目前,MatrixOne v1.0.0 已经发布了,您可以通过[版本发布指南](./../../Release-Notes/v1.0.0.md)来了解最新的发布信息,其中包含了最新的修改与优化。 +目前,MatrixOne v1.0.2 已经发布了,您可以通过[版本发布指南](./../../Release-Notes/v1.0.2.md)来了解最新的发布信息,其中包含了最新的修改与优化。 关于长期的项目规划,请参阅 [MatrixOne Roadmap](https://github.com/matrixorigin/matrixone/issues/613)。 diff --git a/docs/MatrixOne/Deploy/deploy-MatrixOne-cluster.md b/docs/MatrixOne/Deploy/deploy-MatrixOne-cluster.md index 2b6ebb4a1e..49b9c6cb91 100644 --- a/docs/MatrixOne/Deploy/deploy-MatrixOne-cluster.md +++ b/docs/MatrixOne/Deploy/deploy-MatrixOne-cluster.md @@ -647,7 +647,7 @@ mysql -h $(kubectl get svc/mo-tp-cn -n mo-hn -o jsonpath='{.spec.clusterIP}') -P mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 163 -Server version: 8.0.30-MatrixOne-v1.0.0 MatrixOne +Server version: 8.0.30-MatrixOne-v1.0.2 MatrixOne Copyright (c) 2000, 2023, Oracle and/or its affiliates. diff --git a/docs/MatrixOne/Deploy/update-MatrixOne-cluster.md b/docs/MatrixOne/Deploy/update-MatrixOne-cluster.md index c160db5f4b..619982cc07 100644 --- a/docs/MatrixOne/Deploy/update-MatrixOne-cluster.md +++ b/docs/MatrixOne/Deploy/update-MatrixOne-cluster.md @@ -68,7 +68,7 @@ root@master0 ~]# mysql -h $(kubectl get svc/mo-tp-cn -n mo-hn -o jsonpath='{.spec.clusterIP}') -P 6001 -uroot -p111 Welcome to the MariaDB monitor. Commands end with ; or \g. Your MySQL connection id is 1005 - Server version: 8.0.30-MatrixOne-v1.0.0 MatrixOne + Server version: 8.0.30-MatrixOne-v1.0.2 MatrixOne Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. diff --git a/docs/MatrixOne/Develop/Ecological-Tools/Computing-Engine/DataX-write.md b/docs/MatrixOne/Develop/Ecological-Tools/Computing-Engine/DataX-write.md index a51a66a9d1..37cc6514a8 100644 --- a/docs/MatrixOne/Develop/Ecological-Tools/Computing-Engine/DataX-write.md +++ b/docs/MatrixOne/Develop/Ecological-Tools/Computing-Engine/DataX-write.md @@ -212,7 +212,7 @@ MatrixOne 擅长 HTAP 场景的事务处理和低延迟分析计算,ElasticSea ### 环境准备 -- MatrixOne 版本:1.0.0 +- MatrixOne 版本:1.0.2 - Elasticsearch 版本:7.10.2 diff --git a/docs/MatrixOne/Develop/Ecological-Tools/Computing-Engine/Flink.md b/docs/MatrixOne/Develop/Ecological-Tools/Computing-Engine/Flink.md index d6a505cde3..3f345f9230 100644 --- a/docs/MatrixOne/Develop/Ecological-Tools/Computing-Engine/Flink.md +++ b/docs/MatrixOne/Develop/Ecological-Tools/Computing-Engine/Flink.md @@ -36,7 +36,7 @@ Apache Flink 是一个强大的框架和分布式处理引擎,专注于进行 本次实践需要安装部署以下软件环境: -- 完成[单机部署 MatrixOne](https://docs.matrixorigin.cn/1.0.0-rc1/MatrixOne/Get-Started/install-standalone-matrixone/)。 +- 完成[单机部署 MatrixOne](https://docs.matrixorigin.cn/1.0.2/MatrixOne/Get-Started/install-standalone-matrixone/)。 - 下载安装 [lntelliJ IDEA(2022.2.1 or later version)](https://www.jetbrains.com/idea/download/)。 - 根据你的系统环境选择 [JDK 8+ version](https://www.oracle.com/sg/java/technologies/javase/javase8-archive-downloads.html) 版本进行下载安装。 - 下载并安装 [Kafka](https://archive.apache.org/dist/kafka/3.5.0/kafka_2.13-3.5.0.tgz),推荐版本为 2.13 - 3.5.0。 diff --git a/docs/MatrixOne/Develop/Ecological-Tools/Computing-Engine/Spark.md b/docs/MatrixOne/Develop/Ecological-Tools/Computing-Engine/Spark.md index f11db854e1..2c2ed2ce22 100644 --- a/docs/MatrixOne/Develop/Ecological-Tools/Computing-Engine/Spark.md +++ b/docs/MatrixOne/Develop/Ecological-Tools/Computing-Engine/Spark.md @@ -39,7 +39,7 @@ Apache Spark 是一个为高效处理大规模数据而设计的分布式计算 本次实践需要安装部署以下软件环境: -- 已完成[安装和启动 MatrixOne](https://docs.matrixorigin.cn/1.0.0-rc1/MatrixOne/Get-Started/install-standalone-matrixone/)。 +- 已完成[安装和启动 MatrixOne](https://docs.matrixorigin.cn/1.0.2/MatrixOne/Get-Started/install-standalone-matrixone/)。 - 下载并安装 [IntelliJ IDEA version 2022.2.1 及以上](https://www.jetbrains.com/idea/download/)。 - 下载并安装 [JDK 8+](https://www.oracle.com/sg/java/technologies/javase/javase8-archive-downloads.html)。 - 如需从 Hive 导入数据,需要安装 [Hadoop](http://archive.apache.org/dist/hadoop/core/hadoop-3.1.4/) 和 [Hive](https://dlcdn.apache.org/hive/hive-3.1.3/)。 diff --git a/docs/MatrixOne/Develop/Ecological-Tools/Computing-Engine/seatunnel-write.md b/docs/MatrixOne/Develop/Ecological-Tools/Computing-Engine/seatunnel-write.md index 7e8feed17b..f47adc2258 100644 --- a/docs/MatrixOne/Develop/Ecological-Tools/Computing-Engine/seatunnel-write.md +++ b/docs/MatrixOne/Develop/Ecological-Tools/Computing-Engine/seatunnel-write.md @@ -33,7 +33,7 @@ export SEATNUNNEL_HOME="/root/seatunnel" ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ``` -2. 使用 [mo_ctl](https://docs.matrixorigin.cn/1.0.0-rc1/MatrixOne/Maintain/mo_ctl/) 工具将 MySQL 的 DDL 语句直接导入至 MatrixOne。执行以下命令: +2. 使用 [mo_ctl](https://docs.matrixorigin.cn/1.0.2/MatrixOne/Maintain/mo_ctl/) 工具将 MySQL 的 DDL 语句直接导入至 MatrixOne。执行以下命令: ```shell mo_ctl sql /root/mysql.sql diff --git a/docs/MatrixOne/Develop/connect-mo/configure-mo-ssl-connection.md b/docs/MatrixOne/Develop/connect-mo/configure-mo-ssl-connection.md index 48ffb16801..e0b55e4f35 100644 --- a/docs/MatrixOne/Develop/connect-mo/configure-mo-ssl-connection.md +++ b/docs/MatrixOne/Develop/connect-mo/configure-mo-ssl-connection.md @@ -77,7 +77,7 @@ Current pager: stdout Using outfile: '' Using delimiter: ; - Server version: 8.0.30-MatrixOne-v1.0.0 MatrixOne + Server version: 8.0.30-MatrixOne-v1.0.2 MatrixOne Protocol version: 10 Connection: 127.0.0.1 via TCP/IP Client characterset: utf8mb4 diff --git a/docs/MatrixOne/Develop/connect-mo/database-client-tools.md b/docs/MatrixOne/Develop/connect-mo/database-client-tools.md index e8ae28bcf8..eb23444145 100644 --- a/docs/MatrixOne/Develop/connect-mo/database-client-tools.md +++ b/docs/MatrixOne/Develop/connect-mo/database-client-tools.md @@ -39,7 +39,7 @@ MatrixOne 现在支持通过以下几种数据库客户端工具的方式连接 ``` Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1031 - Server version: 8.0.30-MatrixOne-v1.0.0 MatrixOne + Server version: 8.0.30-MatrixOne-v1.0.2 MatrixOne Copyright (c) 2000, 2022, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. diff --git a/docs/MatrixOne/Develop/connect-mo/python-connect-to-matrixone.md b/docs/MatrixOne/Develop/connect-mo/python-connect-to-matrixone.md index 806aa57bef..dc197a76ef 100644 --- a/docs/MatrixOne/Develop/connect-mo/python-connect-to-matrixone.md +++ b/docs/MatrixOne/Develop/connect-mo/python-connect-to-matrixone.md @@ -72,7 +72,7 @@ PyMySQL 是一个纯 Python MySQL 客户端库。 ``` > python3 pymysql_connect_matrixone.py - Database version : 8.0.30-MatrixOne-v1.0.0 + Database version : 8.0.30-MatrixOne-v1.0.2 ``` ## 使用 sqlalchemy 连接 MatrixOne diff --git a/docs/MatrixOne/Develop/import-data/bulk-load/load-csv.md b/docs/MatrixOne/Develop/import-data/bulk-load/load-csv.md index 7cb6b6b1e0..edf961fd8b 100644 --- a/docs/MatrixOne/Develop/import-data/bulk-load/load-csv.md +++ b/docs/MatrixOne/Develop/import-data/bulk-load/load-csv.md @@ -113,7 +113,7 @@ __Note__: *csv*(逗号分隔值)文件是一种特殊的文件类型,可 3. 使用 Docker 启动 MatrixOne,启动时将存放了数据文件的目录 *~/tmp/docker_loaddata_demo/* 挂载到容器的某个目录下,这里容器目录以 */ssb-dbgen-path* 为例: ``` - sudo docker run --name matrixone --privileged -d -p 6001:6001 -v ~/tmp/docker_loaddata_demo/:/ssb-dbgen-path:rw matrixorigin/matrixone:1.0.0 + sudo docker run --name matrixone --privileged -d -p 6001:6001 -v ~/tmp/docker_loaddata_demo/:/ssb-dbgen-path:rw matrixorigin/matrixone:1.0.2 ``` 4. 连接 MatrixOne 服务: diff --git a/docs/MatrixOne/Develop/import-data/bulk-load/using-source.md b/docs/MatrixOne/Develop/import-data/bulk-load/using-source.md index 4dd029f1da..a0871726d7 100644 --- a/docs/MatrixOne/Develop/import-data/bulk-load/using-source.md +++ b/docs/MatrixOne/Develop/import-data/bulk-load/using-source.md @@ -68,6 +68,6 @@ select * from tool; ## 限制说明 -MatrixOne 1.0.0-rc1 版本已经支持 MySQL 的建表语句,因此可以顺畅地将 MySQL 表迁移到 MatrixOne 上。不过需要注意,在迁移过程中,不兼容 MySQL 部分关键字,如 `engine=` 等,在 MatrixOne 中会被自动忽略,也不会影响表结构的迁移。 +MatrixOne 1.0.2 版本已经支持 MySQL 的建表语句,因此可以顺畅地将 MySQL 表迁移到 MatrixOne 上。不过需要注意,在迁移过程中,不兼容 MySQL 部分关键字,如 `engine=` 等,在 MatrixOne 中会被自动忽略,也不会影响表结构的迁移。 但需要特别注意的是,尽管 MatrixOne 支持 MySQL 建表语句,如果迁移的表中包含不兼容的数据类型、触发器、函数或存储过程,仍需要手动修改。更多详细的兼容性信息,参见 [MySQL 兼容性](../../../Overview/feature/mysql-compatibility.md)。 diff --git a/docs/MatrixOne/Develop/schema-design/data-integrity/auto-increment-integrity.md b/docs/MatrixOne/Develop/schema-design/data-integrity/auto-increment-integrity.md index 82aab9ab5f..88ae07332c 100644 --- a/docs/MatrixOne/Develop/schema-design/data-integrity/auto-increment-integrity.md +++ b/docs/MatrixOne/Develop/schema-design/data-integrity/auto-increment-integrity.md @@ -36,7 +36,7 @@ CREATE TABLE table_name ( 下面是一个创建带有自增列的表的示例: ```sql --- 创建了一个名为`employees`的表,其中`id`列被定义为自增列。`id`列的数据类型为`INT`,并通过`AUTO_INCREMENT`关键字指定了自增约束。表的主键设置为`id`列 +-- 创建了一个名为 `employees` 的表,其中 `id` 列被定义为自增列。`id` 列的数据类型为 `INT`,并通过 `AUTO_INCREMENT` 关键字指定了自增约束。表的主键设置为 `id` 列 CREATE TABLE employees ( id INT AUTO_INCREMENT, name VARCHAR(50), @@ -44,7 +44,7 @@ CREATE TABLE employees ( PRIMARY KEY (id) ); --- 插入数据,并让自增列自动生成唯一的标识值,没有为`id`列指定值,而是通过插入数据时自动为`id`列生成递增的唯一值。每次插入新行时,`id`列的值将自动递增。 +-- 插入数据,并让自增列自动生成唯一的标识值,没有为 `id` 列指定值,而是通过插入数据时自动为 `id` 列生成递增的唯一值。每次插入新行时,`id` 列的值将自动递增。 INSERT INTO employees (name, department) VALUES ('John Doe', 'HR'), diff --git a/docs/MatrixOne/Develop/schema-design/data-integrity/foreign-key-constraints.md b/docs/MatrixOne/Develop/schema-design/data-integrity/foreign-key-constraints.md index 2da8186799..ef9ff70d51 100644 --- a/docs/MatrixOne/Develop/schema-design/data-integrity/foreign-key-constraints.md +++ b/docs/MatrixOne/Develop/schema-design/data-integrity/foreign-key-constraints.md @@ -137,8 +137,8 @@ CREATE TABLE Country ( -- 创建一个名为"State"的表,用于存储州/省份信息 CREATE TABLE State ( - StateID INT, -- 州/省份ID字段,整型 - StateName VARCHAR(100), -- 州/省份名字字段,最大长度100的字符串 + StateID INT, -- 州/省份 ID 字段,整型 + StateName VARCHAR(100), -- 州/省份名字字段,最大长度 100 的字符串 CountryID INT, -- 国家 ID 字段,整型,与 Country 表的 CountryID 字段对应 PRIMARY KEY (StateID), -- 将 StateID 设定为这个表的主键 FOREIGN KEY (CountryID) REFERENCES Country(CountryID) -- 设置 CountryID 字段为外键,引用 Country 表的 CountryID 字段 @@ -148,7 +148,7 @@ CREATE TABLE State ( CREATE TABLE City ( CityID INT, -- 城市 ID 字段,整型 CityName VARCHAR(100), -- 城市名字字段,最大长度 100 的字符串 - StateID INT, -- 州/省份ID字段,整型,与State表的StateID字段对应 + StateID INT, -- 州/省份 ID 字段,整型,与 State 表的 StateID 字段对应 PRIMARY KEY (CityID), -- 将 CityID 设定为这个表的主键 FOREIGN KEY (StateID) REFERENCES State(StateID) -- 设置 StateID 字段为外键,引用 State 表的 StateID 字段 ); diff --git a/docs/MatrixOne/Get-Started/install-on-linux/install-on-linux-method1.md b/docs/MatrixOne/Get-Started/install-on-linux/install-on-linux-method1.md index e59368d27c..0ed5f87643 100644 --- a/docs/MatrixOne/Get-Started/install-on-linux/install-on-linux-method1.md +++ b/docs/MatrixOne/Get-Started/install-on-linux/install-on-linux-method1.md @@ -184,7 +184,7 @@ GCC_VERSION="8.5.0" CLANG_VERSION="13.0" GO_VERSION="1.20" MO_GIT_URL="https://github.com/matrixorigin/matrixone.git" -MO_DEFAULT_VERSION="1.0.0-rc1" +MO_DEFAULT_VERSION="v1.0.2" GOPROXY="https://goproxy.cn,direct" STOP_INTERVAL="5" START_INTERVAL="2" @@ -200,7 +200,7 @@ PPROF_PROFILE_DURATION="30" ``` mo_ctl set_conf MO_PATH="/data/mo/matrixone" # 设置自定义的MatrixOne下载路径 mo_ctl set_conf MO_GIT_URL="https://ghproxy.com/https://github.com/matrixorigin/matrixone.git" #针对github原地址下载过慢问题,设置代理下载地址 -mo_ctl set_conf MO_DEFAULT_VERSION="v1.0.0" # 设置所下载的MatrixOne版本 +mo_ctl set_conf MO_DEFAULT_VERSION="v1.0.2" # 设置所下载的MatrixOne版本 ``` ## 步骤 3:一键安装 MatrixOne @@ -218,7 +218,7 @@ mo_ctl set_conf MO_DEFAULT_VERSION="v1.0.0" # 设置所下载的MatrixOne版本 === "通过 MatrixOne (稳定版本) 代码安装" ``` - mo_ctl deploy v1.0.0 + mo_ctl deploy v1.0.2 ``` ## 步骤 4:启动 MatrixOne 服务 @@ -255,7 +255,7 @@ root@VM-16-2-debian:~# mo_ctl connect mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 15 -Server version: 8.0.30-MatrixOne-v1.0.0 MatrixOne +Server version: 8.0.30-MatrixOne-v1.0.2 MatrixOne Copyright (c) 2000, 2023, Oracle and/or its affiliates. diff --git a/docs/MatrixOne/Get-Started/install-on-linux/install-on-linux-method2.md b/docs/MatrixOne/Get-Started/install-on-linux/install-on-linux-method2.md index 398d1afc4a..4f182289f6 100644 --- a/docs/MatrixOne/Get-Started/install-on-linux/install-on-linux-method2.md +++ b/docs/MatrixOne/Get-Started/install-on-linux/install-on-linux-method2.md @@ -92,16 +92,16 @@ Debian11.1 版本默认没有安装 MySQL Client,因此需要手动下载安 ```bash mkdir -p /root/matrixone & cd /root/ - wget https://github.com/matrixorigin/matrixone/releases/download/v1.0.0/mo-v1.0.0-linux-x86_64.zip - unzip -d matrixone/ mo-v1.0.0-linux-x86_64.zip + wget https://github.com/matrixorigin/matrixone/releases/download/v1.0.2/mo-v1.0.2-linux-x86_64.zip + unzip -d matrixone/ mo-v1.0.2-linux-x86_64.zip ``` ARM 架构系统安装包: ```bash mkdir -p /root/matrixone & cd /root/ - wget https://github.com/matrixorigin/matrixone/releases/download/v1.0.0/mo-v1.0.0-linux-arm64.zip - unzip -d matrixone/ mo-v1.0.0-linux-arm64.zip + wget https://github.com/matrixorigin/matrixone/releases/download/v1.0.2/mo-v1.0.2-linux-arm64.zip + unzip -d matrixone/ mo-v1.0.2-linux-arm64.zip ``` === "**下载方式二:`curl` 工具下载二进制包**" @@ -110,21 +110,21 @@ Debian11.1 版本默认没有安装 MySQL Client,因此需要手动下载安 ```bash mkdir -p /root/matrixone & cd /root/ - curl -OL https://github.com/matrixorigin/matrixone/releases/download/v1.0.0/mo-v1.0.0-linux-x86_64.zip - unzip -d matrixone/ mo-v1.0.0-linux-x86_64.zip + curl -OL https://github.com/matrixorigin/matrixone/releases/download/v1.0.2/mo-v1.0.2-linux-x86_64.zip + unzip -d matrixone/ mo-v1.0.2-linux-x86_64.zip ``` ARM 架构系统安装包: ```bash mkdir -p /root/matrixone & cd /root/ - curl -OL https://github.com/matrixorigin/matrixone/releases/download/v1.0.0/mo-v1.0.0-linux-arm64.zip - unzip -d matrixone/ mo-v1.0.0-linux-arm64.zip + curl -OL https://github.com/matrixorigin/matrixone/releases/download/v1.0.2/mo-v1.0.2-linux-arm64.zip + unzip -d matrixone/ mo-v1.0.2-linux-arm64.zip ``` === "**下载方式三:页面下载**" - 如果你想通过更直观的页面下载的方式下载,直接点击进入[版本 1.0.0](https://github.com/matrixorigin/matrixone/releases/tag/v1.0.0),下拉找到 **Assets** 栏,点击安装包 *mo-v1.0.0-linux-x86_64.zip* 或者 *mo-v1.0.0-linux-arm64.zip* 下载再使用 ```unzip``` 命令解压即可。 + 如果你想通过更直观的页面下载的方式下载,直接点击进入[版本 1.0.2](https://github.com/matrixorigin/matrixone/releases/tag/v1.0.2),下拉找到 **Assets** 栏,点击安装包 *mo-v1.0.2-linux-x86_64.zip* 或者 *mo-v1.0.2-linux-arm64.zip* 下载再使用 ```unzip``` 命令解压即可。 ## 步骤 3:安装 mo_ctl 工具 @@ -180,7 +180,7 @@ root@VM-16-2-debian:~# mo_ctl connect mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 15 -Server version: 8.0.30-MatrixOne-v1.0.0 MatrixOne +Server version: 8.0.30-MatrixOne-v1.0.2 MatrixOne Copyright (c) 2000, 2023, Oracle and/or its affiliates. diff --git a/docs/MatrixOne/Get-Started/install-on-linux/install-on-linux-method3.md b/docs/MatrixOne/Get-Started/install-on-linux/install-on-linux-method3.md index 3cddf1b964..66d8ab46f0 100644 --- a/docs/MatrixOne/Get-Started/install-on-linux/install-on-linux-method3.md +++ b/docs/MatrixOne/Get-Started/install-on-linux/install-on-linux-method3.md @@ -41,18 +41,18 @@ 使用以下命令将从 Docker Hub 中拉取 MatrixOne 镜像,你可以选择稳定版本镜像,或开发版本镜像,当 Tag 为 `latest` 时获取最新稳定版本。 -=== "稳定版本的镜像(1.0.0)" +=== "稳定版本的镜像(1.0.2)" ```bash - docker pull matrixorigin/matrixone:1.0.0 - docker run -d -p 6001:6001 --name matrixone matrixorigin/matrixone:1.0.0 + docker pull matrixorigin/matrixone:1.0.2 + docker run -d -p 6001:6001 --name matrixone matrixorigin/matrixone:1.0.2 ``` 如果你使用的是中国大陆的网络,你可以拉取阿里云上的 MatrixOne 稳定版本镜像: ```bash - docker pull registry.cn-shanghai.aliyuncs.com/matrixorigin/matrixone:1.0.0 - docker run -d -p 6001:6001 --name matrixone registry.cn-shanghai.aliyuncs.com/matrixorigin/matrixone:1.0.0 + docker pull registry.cn-shanghai.aliyuncs.com/matrixorigin/matrixone:1.0.2 + docker run -d -p 6001:6001 --name matrixone registry.cn-shanghai.aliyuncs.com/matrixorigin/matrixone:1.0.2 ``` === "开发版本的镜像" @@ -77,7 +77,7 @@ 若 Docker 版本低于 20.10.18 或者 Docker client 和 Docker server 的版本不一致,推荐同时升级到 Docker 最新稳定版本后再尝试。若坚持使用,需要在 ```docker run``` 命令中加上参数 ```--privileged=true```,如: ```bash - docker run -d -p 6001:6001 --name matrixone --privileged=true matrixorigin/matrixone:1.0.0 + docker run -d -p 6001:6001 --name matrixone --privileged=true matrixorigin/matrixone:1.0.2 ``` !!! note diff --git a/docs/MatrixOne/Get-Started/install-on-macos/install-on-macos-method1.md b/docs/MatrixOne/Get-Started/install-on-macos/install-on-macos-method1.md index 295e942a39..2d05ad6693 100644 --- a/docs/MatrixOne/Get-Started/install-on-macos/install-on-macos-method1.md +++ b/docs/MatrixOne/Get-Started/install-on-macos/install-on-macos-method1.md @@ -168,7 +168,7 @@ GCC_VERSION="8.5.0" CLANG_VERSION="13.0" GO_VERSION="1.20" MO_GIT_URL="https://github.com/matrixorigin/matrixone.git" -MO_DEFAULT_VERSION="1.0.0-rc1" +MO_DEFAULT_VERSION="v1.0.2" GOPROXY="https://goproxy.cn,direct" STOP_INTERVAL="5" START_INTERVAL="2" @@ -184,7 +184,7 @@ PPROF_PROFILE_DURATION="30" ``` mo_ctl set_conf MO_PATH="/Users/username/mo/matrixone" # 设置自定义的MatrixOne下载路径 mo_ctl set_conf MO_GIT_URL="https://ghproxy.com/https://github.com/matrixorigin/matrixone.git" #针对github原地址下载过慢问题,设置代理下载地址 -mo_ctl set_conf MO_DEFAULT_VERSION="v1.0.0" # 设置所下载的MatrixOne版本 +mo_ctl set_conf MO_DEFAULT_VERSION="v1.0.2" # 设置所下载的MatrixOne版本 ``` ## 步骤 3:一键安装 MatrixOne @@ -202,7 +202,7 @@ mo_ctl set_conf MO_DEFAULT_VERSION="v1.0.0" # 设置所下载的MatrixOne版本 === "通过 MatrixOne (稳定版本) 代码安装" ``` - mo_ctl deploy v1.0.0 + mo_ctl deploy v1.0.2 ``` ## 步骤 4:启动 MatrixOne 服务 @@ -239,7 +239,7 @@ mo_ctl set_conf MO_DEFAULT_VERSION="v1.0.0" # 设置所下载的MatrixOne版本 mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 15 -Server version: 8.0.30-MatrixOne-v1.0.0 MatrixOne +Server version: 8.0.30-MatrixOne-v1.0.2 MatrixOne Copyright (c) 2000, 2023, Oracle and/or its affiliates. diff --git a/docs/MatrixOne/Get-Started/install-on-macos/install-on-macos-method2.md b/docs/MatrixOne/Get-Started/install-on-macos/install-on-macos-method2.md index 7f4bc2db93..b0f6c0f48e 100644 --- a/docs/MatrixOne/Get-Started/install-on-macos/install-on-macos-method2.md +++ b/docs/MatrixOne/Get-Started/install-on-macos/install-on-macos-method2.md @@ -93,16 +93,16 @@ __Tips__: 建议你下载安装这两个下载工具其中之一,方便后续 ```bash mkdir -p /User/username/mo/matrixone & cd /User/username/mo - wget https://github.com/matrixorigin/matrixone/releases/download/v1.0.0/mo-v1.0.0-darwin-x86_64.zip - unzip -d matrixone/ mo-v1.0.0-darwin-x86_64.zip + wget https://github.com/matrixorigin/matrixone/releases/download/v1.0.2/mo-v1.0.2-darwin-x86_64.zip + unzip -d matrixone/ mo-v1.0.2-darwin-x86_64.zip ``` ARM 架构系统安装包: ```bash mkdir -p /User/username/mo/matrixone & cd /User/username/mo - wget https://github.com/matrixorigin/matrixone/releases/download/v1.0.0/mo-v1.0.0-darwin-arm64.zip - unzip -d matrixone/ mo-v1.0.0-darwin-arm64.zip + wget https://github.com/matrixorigin/matrixone/releases/download/v1.0.2/mo-v1.0.2-darwin-arm64.zip + unzip -d matrixone/ mo-v1.0.2-darwin-arm64.zip ``` === "**下载方式二:`curl` 工具下载二进制包**" @@ -111,21 +111,21 @@ __Tips__: 建议你下载安装这两个下载工具其中之一,方便后续 ```bash mkdir -p /User/username/mo/matrixone & cd /User/username/mo - curl -OL https://github.com/matrixorigin/matrixone/releases/download/v1.0.0/mo-v1.0.0-darwin-x86_64.zip - unzip -d matrixone/ mo-v1.0.0-darwin-x86_64.zip + curl -OL https://github.com/matrixorigin/matrixone/releases/download/v1.0.2/mo-v1.0.2-darwin-x86_64.zip + unzip -d matrixone/ mo-v1.0.2-darwin-x86_64.zip ``` ARM 架构系统安装包: ```bash mkdir -p /User/username/mo/matrixone & cd /User/username/mo - curl -OL https://github.com/matrixorigin/matrixone/releases/download/v1.0.0/mo-v1.0.0-darwin-arm64.zip - unzip -d matrixone/ mo-v1.0.0-darwin-arm64.zip + curl -OL https://github.com/matrixorigin/matrixone/releases/download/v1.0.2/mo-v1.0.2-darwin-arm64.zip + unzip -d matrixone/ mo-v1.0.2-darwin-arm64.zip ``` === "**下载方式三:页面下载**" - 如果你想通过更直观的页面下载的方式下载,直接点击进入[版本 1.0.0](https://github.com/matrixorigin/matrixone/releases/tag/v1.0.0),下拉找到 **Assets** 栏,点击安装包 *mo-v1.0.0-darwin-x86_64.zip* 或 *mo-v1.0.0-darwin-arm64.zip* 下载即可。 + 如果你想通过更直观的页面下载的方式下载,直接点击进入[版本 1.0.2](https://github.com/matrixorigin/matrixone/releases/tag/v1.0.2),下拉找到 **Assets** 栏,点击安装包 *mo-v1.0.2-darwin-x86_64.zip* 或 *mo-v1.0.2-darwin-arm64.zip* 下载即可。 ## 步骤 3:安装 mo_ctl 工具 @@ -181,7 +181,7 @@ mo_ctl set_conf MO_PATH="/User/username/mo/" mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 15 -Server version: 8.0.30-MatrixOne-v1.0.0 MatrixOne +Server version: 8.0.30-MatrixOne-v1.0.2 MatrixOne Copyright (c) 2000, 2023, Oracle and/or its affiliates. diff --git a/docs/MatrixOne/Get-Started/install-on-macos/install-on-macos-method3.md b/docs/MatrixOne/Get-Started/install-on-macos/install-on-macos-method3.md index 7461a15fd1..7574e0a2e9 100644 --- a/docs/MatrixOne/Get-Started/install-on-macos/install-on-macos-method3.md +++ b/docs/MatrixOne/Get-Started/install-on-macos/install-on-macos-method3.md @@ -24,18 +24,18 @@ 使用以下命令将从 Docker Hub 中拉取 MatrixOne 镜像,你可以选择稳定版本镜像,或开发版本镜像,当 Tag 为 `latest` 时获取最新稳定版本。 -=== "稳定版本的镜像(1.0.0)" +=== "稳定版本的镜像(1.0.2)" ```bash - docker pull matrixorigin/matrixone:1.0.0 - docker run -d -p 6001:6001 --name matrixone matrixorigin/matrixone:1.0.0 + docker pull matrixorigin/matrixone:1.0.2 + docker run -d -p 6001:6001 --name matrixone matrixorigin/matrixone:1.0.2 ``` 如果你使用的是中国大陆的网络,你可以拉取阿里云上的 MatrixOne 稳定版本镜像: ```bash - docker pull registry.cn-shanghai.aliyuncs.com/matrixorigin/matrixone:1.0.0 - docker run -d -p 6001:6001 --name matrixone registry.cn-shanghai.aliyuncs.com/matrixorigin/matrixone:1.0.0 + docker pull registry.cn-shanghai.aliyuncs.com/matrixorigin/matrixone:1.0.2 + docker run -d -p 6001:6001 --name matrixone registry.cn-shanghai.aliyuncs.com/matrixorigin/matrixone:1.0.2 ``` === "开发版本的镜像" @@ -60,7 +60,7 @@ 若 Docker 版本低于 20.10.18 或者 Docker client 和 Docker server 的版本不一致,推荐同时升级到 Docker 最新稳定版本后再尝试。若坚持使用,需要在 ```docker run``` 命令中加上参数 ```--privileged=true```,如: ```bash - docker run -d -p 6001:6001 --name matrixone --privileged=true matrixorigin/matrixone:1.0.0 + docker run -d -p 6001:6001 --name matrixone --privileged=true matrixorigin/matrixone:1.0.2 ``` !!! note diff --git a/docs/MatrixOne/Maintain/mo_ctl.md b/docs/MatrixOne/Maintain/mo_ctl.md index 7729e1a6ca..fb3ab97030 100644 --- a/docs/MatrixOne/Maintain/mo_ctl.md +++ b/docs/MatrixOne/Maintain/mo_ctl.md @@ -24,7 +24,7 @@ | `mo_ctl stop` | 停止所有 MatrixOne 服务进程 | | `mo_ctl restart` | 重启 MatrixOne 服务 | | `mo_ctl connect` | 调用 MySQL Client 连接 MatrixOne 服务 | -| `mo_ctl upgrade` | 将MatrixOne从当前版本升级/降级到某个发布版本或者commit id 版本 | +| `mo_ctl upgrade` | 将 MatrixOne 从当前版本升级/降级到某个发布版本或者 commit id 版本 | | `mo_ctl set_conf` | 设置各类使用参数 | | `mo_ctl get_conf` | 查看当前使用参数 | | `mo_ctl uninstall` | 从 MO_PATH 路径下卸载 MatrixOne | @@ -145,12 +145,12 @@ mo_ctl deploy help Usage : mo_ctl deploy [mo_version] [force] # deploy mo onto the path configured [mo_version]: optional, specify an mo version to deploy [force] : optional, if specified will delete all content under MO_PATH and deploy from beginning - e.g. : mo_ctl deploy # default, same as mo_ctl deploy 1.0.0-rc1 + e.g. : mo_ctl deploy # default, same as mo_ctl deploy 1.0.2 : mo_ctl deploy main # deploy development latest version : mo_ctl deploy d29764a # deploy development version d29764a - : mo_ctl deploy 1.0.0-rc1 # deploy stable verson 1.0.0-rc1 - : mo_ctl deploy force # delete all under MO_PATH and deploy verson 1.0.0-rc1 - : mo_ctl deploy 1.0.0-rc1 force # delete all under MO_PATH and deploy stable verson 1.0.0-rc1 from beginning + : mo_ctl deploy 1.0.2 # deploy stable verson 1.0.2 + : mo_ctl deploy force # delete all under MO_PATH and deploy verson 1.0.2 + : mo_ctl deploy 1.0.2 force # delete all under MO_PATH and deploy stable verson 1.0.2 from beginning ``` ### start - 启动 MatrixOne 服务 @@ -290,7 +290,7 @@ Usage : mo_ctl getconf [conf_list] # get configurations | GCC_VERSION | precheck 检查的 gcc 版本 | 默认为 8.5.0 | | GO_VERSION | precheck 检查的 go 版本 | 默认为 1.20 | | MO_GIT_URL | MatrixOne 的源码拉取地址 | 默认为 | -| MO_DEFAULT_VERSION | 默认拉取的 MatrixOne 的版本 | 默认为 1.0.0-rc1 | +| MO_DEFAULT_VERSION | 默认拉取的 MatrixOne 的版本 | 默认为 1.0.2 | | GOPROXY | GOPROXY 的地址,一般为国内加速拉取 golang 依赖包而使用 | 默认为,direct | | STOP_INTERVAL | 停止间隔,停止服务后检测服务状态等待时间 | 默认为 5 秒 | | START_INTERVAL | 启动间隔,启动服务后检测服务状态等待时间 | 默认为 2 秒 | @@ -343,11 +343,11 @@ Usage : mo_ctl uninstall # uninstall mo from path MO_PATH=/data ``` mo_ctl upgrade help Usage : mo_ctl upgrade [version_commitid] # upgrade or downgrade mo from current version to a target commit id or stable version - [commitid] : a commit id such as '38888f7', or a stable version such as '1.0.0-rc1' + [commitid] : a commit id such as '38888f7', or a stable version such as '1.0.2' : use 'latest' to upgrade to latest commit on main branch if you don't know the id e.g. : mo_ctl upgrade 38888f7 # upgrade/downgrade to commit id 38888f7 on main branch : mo_ctl upgrade latest # upgrade/downgrade to latest commit on main branch - : mo_ctl upgrade 1.0.0-rc1 # upgrade/downgrade to stable version 1.0.0-rc1 + : mo_ctl upgrade 1.0.2 # upgrade/downgrade to stable version 1.0.2 ``` ### watchdog - 保活 MatrixOne diff --git a/docs/MatrixOne/Maintain/mount-data-by-docker.md b/docs/MatrixOne/Maintain/mount-data-by-docker.md index 7224e0d2c2..9463ea45b5 100644 --- a/docs/MatrixOne/Maintain/mount-data-by-docker.md +++ b/docs/MatrixOne/Maintain/mount-data-by-docker.md @@ -17,7 +17,7 @@ 2. 把本地**空目录** *${local_data_path}/mo-data* 挂载到 Docker 容器目录 */mo-data* 下,命令示例如下: ```bash - sudo docker run --name -d -p 6001:6001 -v ${local_data_path}/mo-data:/mo-data:rw matrixorigin/matrixone:1.0.0 + sudo docker run --name -d -p 6001:6001 -v ${local_data_path}/mo-data:/mo-data:rw matrixorigin/matrixone:1.0.2 ``` | 参数 | 描述 | @@ -31,7 +31,7 @@ 1. 首先启动一个 MatrixOne 的容器实例,这个容器实例将提供一套标准的启动配置文件: ```bash - docker run -d -p 6001:6001 --name matrixone matrixorigin/matrixone:1.0.0 + docker run -d -p 6001:6001 --name matrixone matrixorigin/matrixone:1.0.2 ``` 2. 查看 Docker 已经启动的 MatrixOne 的 containerID,并将配置文件目录拷贝到本地目录的 *${local_config_path}* 目录下: @@ -53,7 +53,7 @@ 6. 挂载配置文件到 Docker 容器目录,同时创建并启动 MatrixOne,挂载命令示例如下: ```bash - sudo docker run --name -d -p 6001:6001 -v ${local_config_path}/launch:/etc/launch:rw --entrypoint "/mo-service" matrixorigin/matrixone:1.0.0 -launch /etc/launch/launch.toml + sudo docker run --name -d -p 6001:6001 -v ${local_config_path}/launch:/etc/launch:rw --entrypoint "/mo-service" matrixorigin/matrixone:1.0.2 -launch /etc/launch/launch.toml ``` | 参数 | 描述 | @@ -66,7 +66,7 @@ 若 Docker 版本低于 20.10.18 或者 Docker client 和 Docker server 的版本不一致,推荐同时升级到 Docker 最新稳定版本后再尝试。若坚持使用,需要在 ```docker run``` 命令中加上参数 ```--privileged=true```,如: ```bash - docker run -d -p 6001:6001 --name matrixone --privileged=true matrixorigin/matrixone:1.0.0 + docker run -d -p 6001:6001 --name matrixone --privileged=true matrixorigin/matrixone:1.0.2 ``` 更多关于 *Docker run* 的指令释义,运行命令 `docker run --help` 进行查看。 diff --git a/docs/MatrixOne/Migrate/migrate-from-mysql-to-matrixone.md b/docs/MatrixOne/Migrate/migrate-from-mysql-to-matrixone.md index fde5af261d..c0be416c01 100644 --- a/docs/MatrixOne/Migrate/migrate-from-mysql-to-matrixone.md +++ b/docs/MatrixOne/Migrate/migrate-from-mysql-to-matrixone.md @@ -150,6 +150,6 @@ MatrixOne 中,数据类型在保持与 MySQL 命名一致的情况下,在精 ## 限制 -MatrixOne 1.0.0-rc1 版本已经支持 MySQL 的建表语句,因此可以顺畅地将 MySQL 表迁移到 MatrixOne 上。不过需要注意,在迁移过程中,不兼容 MySQL 部分关键字,如 `engine=` 等,在 MatrixOne 中会被自动忽略,也不会影响表结构的迁移。 +MatrixOne 1.0.2 版本已经支持 MySQL 的建表语句,因此可以顺畅地将 MySQL 表迁移到 MatrixOne 上。不过需要注意,在迁移过程中,不兼容 MySQL 部分关键字,如 `engine=` 等,在 MatrixOne 中会被自动忽略,也不会影响表结构的迁移。 但需要特别注意的是,尽管 MatrixOne 支持 MySQL 建表语句,如果迁移的表中包含不兼容的数据类型、触发器、函数或存储过程,仍需要手动修改。更多详细的兼容性信息,参见 [MySQL 兼容性](../Overview/feature/mysql-compatibility.md)。 diff --git a/docs/MatrixOne/Overview/architecture/architecture-wal.md b/docs/MatrixOne/Overview/architecture/architecture-wal.md new file mode 100644 index 0000000000..71d89a2ec3 --- /dev/null +++ b/docs/MatrixOne/Overview/architecture/architecture-wal.md @@ -0,0 +1,227 @@ +# WAL 技术详解 + +WAL(Write Ahead Log)是一项与数据库原子性和持久性相关的技术,在事务提交时把随机写转换成顺序读写。事务的更改随机地发生在各页上,这些页很分散,随机写的开销大于顺序写,会降低提交的性能。WAL 只记录事务的更改操作,例如在某个 block 中增加了一行,提交事务时新的 WAL entry 顺序地写在 WAL 文件末尾,提交之后再异步地更新那些脏页,销毁对应的 WAL entry,释放空间。 + +MatrixOne 的 WAL 是物理日志,它会记录每行更新发生的位置,每次回放出来,数据不仅在逻辑上相同,在底层的组织结构也是一样的。 + +## Commit Pipeline + +Commit Pipeline 是处理事务提交的组件。提交之前要更新 memtable,持久化 WAL entry,执行这些任务的耗时决定了提交的性能。持久化 WAL entry 涉及到 IO,比较耗时。MatrixOne 中采用 commit pipeline,异步持久化 WAL entry,不阻塞内存中的更新。 + +![](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/overview/architecture/wal_Commit_Pipeline.png) + +**事务提交的流程是:** + +- 把更改更新到 memtable 中,事务进入 commit pipeline 之前,先并发更新 memtable,事务之间互相不 +阻塞。这时这些更改的状态为未提交,对任何事务不可见; + +- 进入 commit pipeline 检查冲突; + +- 持久化 WAL entry,从内存收集 WAL entry 写到后端。持久化 WAL entry 是异步的,队列里只把 WAL entry 传给后端就立刻返回,不用等待写入成功,这样不会阻塞后续其他事务。后端同时处理一批 entry,通过 Group Commit 进一步加速持久化。 + +- 更新 memtable 中的状态使事务可见,事务按照进队列的顺序依次更新状态,这样事务可见的顺序和队列里写 WAL entry 的顺序是一致的。 + +## Checkpoint + +Checkpoint 将脏数据写入 Storage,销毁旧的 log entry,释放空间。MatrixOne 中,checkpoint 是一个后台发起的任务,它的流程是: + +- 选定一个合适的时间戳作为 checkpoint,然后扫描时间戳之前的修改。图上的 t0 是上个 checkpoint,t1 是当前选定的 checkpoint。[t0,t1] 之间发生的更改需要转存。 + +- 转存 DML 修改。DML 更改存在 memtable 中的各个 block 中。Logtail Mgr 是一个内存模块,记录着每个事务改动了哪些 block。在 Logtail Mgr 上扫描 [t0,t1] 之间的事务,发起后台事务把这些 block 转存到 Storage 上,在元数据中记录地址。这样,所有 t1 前提交的 DML 更改都能通过元数据中的地址查到。为了及时做 checkpoint,不让 WAL 无限增长,哪怕区间中 block 只改动了一行,也需要转存。 + +![](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/overview/architecture/wal_Checkpoint1.png) + +- 扫描 Catalog 转存 DDL 和元数据更改。Catalog 是一棵树,记录了所有的 DDL 和元数据信息,树上的每个节点都会记录更改发生的时间戳。扫描时收集所有落在 [t0,t1] 之间的更改。 + +![](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/overview/architecture/wal_Checkpoint2.png) + +- 销毁旧的 WAL entry。Logtail Mgr 中存了每个事务对应的 LSN。根据时间戳,找到 t1 前最后一个事务,然后通知 Log Backend 清理这个事务的 LSN 之前的所有日志。 + +## Log Backend + +MatrixOne 的 WAL 能写在各种 Log Backend 中。最初的 Log Backend 基于本地文件系统。为了分布式特性,我们自研了高可靠低延迟 Log Service 作为新的 Log Backend。我们为适配不同的 log backend,抽象出一个虚拟的 backend, 通过一些很轻量的 driver 开发,对接不同的 backend。 + +**Driver 需要适配出这些接口:** + +- Append,提交事务时异步地写入 log entry: + +``` +Append(entry) (Lsn, error) +``` + +- Read,重启时批量读取 log entry: + +``` +Read(Lsn, maxSize) (entry, Lsn, error) +``` + +- Truncate 接口会销毁 LSN 前的所有 log entry,释放空间: + +``` +Truncate(lsn Lsn) error +``` + +## Group Commit + +Group Commit 可以加速持久化 log entry。持久化 log entry 涉及到 IO,非常耗时,经常是提交的瓶颈。为了降低延迟,批量向 Log Backend 中写入 log entry。比如,在文件系统中 fsync 耗时很久。如果每条 entry 都 fsync,会耗费大量时间。基于文件系统的 Log Backend 中,多个 entry 写完后统一只做一次 fsync,这些 entry 刷盘的时间成本之和近似一条 entry 刷盘的时间。 + +![](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/overview/architecture/wal_Group_Commit.png) + +Log Service 中支持并发写入,各条 entry 刷盘的时间可以重叠,这也能缩短写 entry 的总时间,提高了提交的并发。 + +## 处理 Log Backend 的乱序 LSN + +为了加速,向 Log Backend 并发写入 entry,写入成功的顺序和发出请求的顺序不一致,导致 Log Backend 中产生的 LSN 和上层传给 Driver 的逻辑 LSN 不一致。Truncate 和重启的时候要处理这些乱序 LSN。为了保证 Log Backend 中的 LSN 基本有序,乱序的跨度不要太大,维持了一个逻辑 LSN 的窗口,如果有很早的 log entry 正在写入还未成功,会停止向 Log Backend 写入新的 entry。例如,如果窗口的长度是 7,图中的 LSN 为 13 的 entry 还未返回,就会阻塞住 LSN 大于等于 20 的 entry。 + +![](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/overview/architecture/wal_Log_Backend.png) + +Log Backend 中通过 truncate 操作销毁日志,销毁指定 LSN 之前的所有 entry。这个 LSN 之前的 entry 所对应的逻辑 LSN 都要小于逻辑 truncate 点。比如图中逻辑 truncate 到 7,这条 entry 对应 Log Backend 中的 11,但是 Log Backend 中 5,6,7,10 对应的逻辑 LSN 都大于 7,不能被 truncate。Log Backend 只能 truncate 4。 + +重启时,会跳过开始和末尾那些不连续的 entry。比如图上的 Log Backend 写到 14 时,整个机器断电了,重启时会根据上次的 truncate 信息过滤掉开头 8,9,11。等读完所有的 entry 发现 6,14 的逻辑 LSN 和其他的 entry 不连续,就丢弃末尾的 6 和 14。 + +## MatrixOne 中 WAL 的具体格式 + +每个写事务对应一条 log entry,由 LSN,Transaction Context 和多个 Command 组成。 + +``` ++---------------------------------------------------------+ +| Transaction Entry | ++-----+---------------------+-----------+-----------+- -+ +| LSN | Transaction Context | Command-1 | Command-2 | ... | ++-----+---------------------+-----------+-----------+- -+ +``` + +**LSN**:每条 log entry 对应一个 LSN。LSN 连续递增,在做 checkpoint 时用来删除 entry。 + +**Transaction Context**:记录事务信息 + +- StartTS 为事务开始的时间戳。 +- CommitTS 为结束的时间戳。 +- Memo 记录事务更改了哪些地方的数据。重启的时候,会把这些信息恢复到 Logtail Mgr 里,做 checkpoint 要用到这些信息。 + +``` ++---------------------------+ +| Transaction Context | ++---------+----------+------+ +| StartTS | CommitTS | Memo | ++---------+----------+------+ +``` + +**Transaction Commands**:事务中每种写操作对应一个或多个 command。log entry 会记录事务中所有的 command。 + +| Operator | Command | +| :----------------- | :---------------- | +| DDL | Update Catalog | +| Insert | Update Catalog | +| | Append | +| Delete | Delete | +| Compact&Merge | Update Catalog | + +- Operators:MatrixOne 中 DN 负责提交事务,向 Log Backend 中写 log entry,做 checkpoint。DN 支持建库,删库,建表,删表,更新表结构,插入,删除,同时后台会自动触发排序。更新操作被拆分成插入和删除。 + + - DDL + DDL 包括建库,删库,建表,删表,更新表结构。DN 在 Catalog 里记录了表和库的信息。内存里的 Catalog 是一棵树,每个结点是一条 catalog entry。catalog entry 有 4 类,database,table,segment 和 block,其中 segment 和 block 是元数据,在插入数据和后台排序的时候会变更。每条 database entry 对应一个库,每条 table entry 对应一张表。每个 DDL 操作对应一条 database/table entry,在 entry 里记录成 Update Catalog Command。 + + - Insert + 新插入的数据记录在 Append Command 中。DN 中的数据记录在 block 中,多个 block 组成一个 segment。如果 DN 中没有足够的 block 或 segment 记录新插入的数据,就会新建一个。这些变化记录在 Update Catalog Command 中。大事务中,由 CN 直接把数据写入 S3,DN 只提交元数据。这样,Append Command 中的数据不会很大。 + + - Delete + DN 记录 Delete 发生的行号。读取时,先读所有插入过的数据,然后再减去这些行。事务中,同一个 block 上所有的删除合并起来,对应一个 Delete Command。 + + - Compact & Merge + DN 后台发起事务,把内存里的数据转存到 s3 上。把 S3 上的数据按主键排序,方便读的时候过滤。compact 发生在一个 block 上,compact 之后 block 内的数据是有序的。merge 发生在 segment 里,会涉及多个 block,merge 之后整个 segment 内有序。compact/merge 前后的数据不变,只改变元数据,删除旧的 block/segment,创建新的 block/segment。每次删除/创建对应一条 Update Catalog Command。 + +- Commands + +
   1.  Update Catalog
+ +Catalog 从上到下每层分别是 database,table,segment 和 block。一条 Updata Catalog Command 对应一条 Catalog Entry。每次 ddl 或者跟新元数据对应一条 Update Catalog Command。Update Catalog Command 包含 Dest 和 EntryNode。 + +``` ++-------------------+ +| Update Catalog | ++-------+-----------+ +| Dest | EntryNode | ++-------+-----------+ +``` + +Dest 是这条 Command 作用的位置,记录了对应结点和他的祖先结点的 id。重启的时候会通过 Dest,在 Catalog 上定位到操作的位置。 + +| Type | Dest | +| :------------------|:------------------------------------------| +| Update Database | database id | +| Update Table | database id,table id | +| Update Segment | database id,table id,segment id | +| Update Block | atabase id,table id,segment id,block id | + +EntryNode 记录了 entry 的创建时间和删除时间。如果 entry 没被删除,删除时间为 0。如果当前事务正在创建或者删除,对应的时间为 UncommitTS。 + +``` ++-------------------+ +| Entry Node | ++---------+---------+ +| Create@ | Delete@ | ++---------+---------+ +``` + +对于 segment 和 block,Entry Node 还记录了 metaLoc,deltaLoc,分别是数据和删除记录在 S3 上的地址。 + +``` + +----------------------------------------+ + | Entry Node | + +---------+---------+---------+----------+ + | Create@ | Delete@ | metaLoc | deltaLoc | + +---------+---------+---------+----------+ +``` + +对于 table,Entry Node 还记录了表结构 schema。 + +``` + +----------------------------+ + | Entry Node | + +---------+---------+--------+ + | Create@ | Delete@ | schema | + +---------+---------+--------+ +``` + +
   2.  Append
+ +Append Command 中记录了插入的数据和和这些数据的位置。 + +``` ++-------------------------------------------+ +| Append Command | ++--------------+--------------+- -+-------+ +| AppendInfo-1 | AppendInfo-2 | ... | Batch | ++--------------+--------------+- -+-------+ +``` + +- Batch 是插入的数据。 + +- AppendInfo + 一个 Append Data Command 中的数据可能跨多个 block。每个 block 对应一个 Append Info,记录了数据在 Command 的 Batch 中的位置 pointer to data,还有数据在 block 中的位置 destination。 + +``` ++------------------------------------------------------------------------------+ +| AppendInfo | ++-----------------+------------------------------------------------------------+ +| pointer to data | destination | ++--------+--------+-------+----------+------------+----------+--------+--------+ +| offset | length | db id | table id | segment id | block id | offset | length | ++--------+--------+-------+----------+------------+----------+--------+--------+ +``` + +
   3.  Delete Command
+ +每个 Delete Command 只包含一个 block 中的删除。 + +``` ++---------------------------+ +| Delete Command | ++-------------+-------------+ +| Destination | Delete Mask | ++-------------+-------------+ +``` + +- Destination 记录 Delete 发生在哪个 Block 上。 +- Delete Mask 记录删除掉的行号。 diff --git a/docs/MatrixOne/Overview/feature/feature-overview.md b/docs/MatrixOne/Overview/feature/feature-overview.md index f00be9f73f..69d8117559 100644 --- a/docs/MatrixOne/Overview/feature/feature-overview.md +++ b/docs/MatrixOne/Overview/feature/feature-overview.md @@ -2,7 +2,7 @@ ## MatrixOne 特性 -在 MatrixOne 版本 1.0.0 中,具有如下特性,让你在使用 MatrixOne 的过程中更加高效: +在 MatrixOne 版本 1.0.2 中,具有如下特性,让你在使用 MatrixOne 的过程中更加高效: ### 分布式架构 diff --git a/docs/MatrixOne/Overview/matrixone-feature-list.md b/docs/MatrixOne/Overview/matrixone-feature-list.md index bae38aac2a..124a5d0433 100644 --- a/docs/MatrixOne/Overview/matrixone-feature-list.md +++ b/docs/MatrixOne/Overview/matrixone-feature-list.md @@ -175,7 +175,7 @@ | 流式导入 LOAD DATA INLINE | Y | | 从对象存储导入 | Y | | modump 工具导出 SQL/CSV | Y | -| SELECT INTO导出CSV/JSON | Y | +| SELECT INTO 导出 CSV/JSON | Y | | mysqldump 原生工具 | N | ## 安全与访问控制 diff --git a/docs/MatrixOne/Overview/whats-new.md b/docs/MatrixOne/Overview/whats-new.md index 9c43de0386..1602050c39 100644 --- a/docs/MatrixOne/Overview/whats-new.md +++ b/docs/MatrixOne/Overview/whats-new.md @@ -1,5 +1,5 @@ # **最新发布** -MatrixOne 的最新版本为 1.0.0,发布于 2023 年 11 月 13 日,详情请见: +MatrixOne 的最新版本为 1.0.2,发布于 2023 年 12 月 23 日,详情请见: -* [v1.0.0 发布公告](../Release-Notes/v1.0.0.md) +* [v1.0.2 发布公告](../Release-Notes/v1.0.2.md) diff --git a/docs/MatrixOne/Performance-Tuning/optimization-concepts/through-partition/through-partition-by.md b/docs/MatrixOne/Performance-Tuning/optimization-concepts/through-partition/through-partition-by.md index 6110ba5ef1..efe3bc18ae 100644 --- a/docs/MatrixOne/Performance-Tuning/optimization-concepts/through-partition/through-partition-by.md +++ b/docs/MatrixOne/Performance-Tuning/optimization-concepts/through-partition/through-partition-by.md @@ -49,7 +49,7 @@ MatrixOne 将表中的数据根据表的一个或多个列的键值划分到不 在选择分区键时,需要考虑以下因素: - 高基数:具有高基数的分区键将导致更好的数据分布和可扩展性。例如,对于一个表,如果有学生的性别和年龄两种属性,年龄的基数比性别要高,更适合作为分区键。 -- 独特性:分区键应尽量保持独特性,从而避免某个分区成为单独的热点。使用复合键可以实现独特性。例如,在某个公司中,如果半数以上不同部门的员工都在同一个城市中,以城市作为分区键将导致该部门成为热点。而使用复合键,例如部门 ID+城市 ID 的组合分区方式,可以大幅降低热点分区的概率。 +- 独特性:分区键应尽量保持独特性,从而避免某个分区成为单独的热点。使用复合键可以实现独特性。例如,在某个公司中,如果半数以上不同部门的员工都在同一个城市中,以城市作为分区键将导致该部门成为热点。而使用复合键,例如部门 ID+ 城市 ID 的组合分区方式,可以大幅降低热点分区的概率。 ### 制定分区策略 diff --git a/docs/MatrixOne/Reference/Functions-and-Operators/String/lcase.md b/docs/MatrixOne/Reference/Functions-and-Operators/String/lcase.md new file mode 100644 index 0000000000..b279c4c861 --- /dev/null +++ b/docs/MatrixOne/Reference/Functions-and-Operators/String/lcase.md @@ -0,0 +1,37 @@ +# **LCASE()** + +## **函数说明** + +`LCASE()` 用于将给定的字符串转换为小写形式,为 [`LOWER()`](lower.md) 的近义词。 + +## **函数语法** + +``` +> LCASE(str) +``` + +## **参数释义** + +| 参数 | 说明 | +| ---- | ---- | +| str | 必要参数,字母字符。| + +## **示例** + +```sql +mysql> select lcase('HELLO'); ++--------------+ +| lcase(HELLO) | ++--------------+ +| hello | ++--------------+ +1 row in set (0.02 sec) + +mysql> select lcase('A'),lcase('B'),lcase('C'); ++----------+----------+----------+ +| lcase(A) | lcaser(B) | lcase(C) | ++----------+----------+----------+ +| a | b | c | ++----------+----------+----------+ +1 row in set (0.03 sec) +``` diff --git a/docs/MatrixOne/Reference/Functions-and-Operators/String/ucase.md b/docs/MatrixOne/Reference/Functions-and-Operators/String/ucase.md new file mode 100644 index 0000000000..398ccc9428 --- /dev/null +++ b/docs/MatrixOne/Reference/Functions-and-Operators/String/ucase.md @@ -0,0 +1,37 @@ +# **UCASE()** + +## **函数说明** + +`UCASE()` 用于将给定的字符串转换为大写形式,为 [`UPPER()`](upper.md) 的近义词。 + +## **函数语法** + +``` +> UCASE(str) +``` + +## **参数释义** + +| 参数 | 说明 | +| ---- | ---- | +| str | 必要参数,字母字符。| + +## **示例** + +```sql +mysql> select ucase('hello'); ++--------------+ +| ucase(hello) | ++--------------+ +| HELLO | ++--------------+ +1 row in set (0.03 sec) + +mysql> select ucase('a'),ucase('b'),ucase('c'); ++----------+----------+----------+ +| ucase(a) | ucase(b) | ucase(c) | ++----------+----------+----------+ +| A | B | C | ++----------+----------+----------+ +1 row in set (0.03 sec) +``` diff --git a/docs/MatrixOne/Reference/Variable/system-variables/save_query_result.md b/docs/MatrixOne/Reference/Variable/system-variables/save_query_result.md index fbc6f95158..90980bfd70 100644 --- a/docs/MatrixOne/Reference/Variable/system-variables/save_query_result.md +++ b/docs/MatrixOne/Reference/Variable/system-variables/save_query_result.md @@ -10,6 +10,11 @@ - `query_result_maxsize`:设置单个查询结果最大值。 +## 限制 + +- 只支持保存带有返回结果的语句,如 `SELECT`, `SHOW`, `DESC`, `EXECUTE` 语句 +- 对于 `SELECT` 语句,只保存以 `/* cloud_user */` 和 `/* save_result */` 固定开头的 `SELECT` 语句的结果。 + ## 开启保存查询结果设置 - 仅对当前会话开启保存查询结果: @@ -19,7 +24,14 @@ set save_query_result = on ``` -- 如需全局开启,可在启动 MatrixOne 之前,修改配置文件 `cn.toml`,插入以下代码并保存: +- 对全局开启保存查询结果: + +```sql +-- 默认为 off +set global save_query_result = on +``` + +全局开启也可在启动 MatrixOne 之前,修改配置文件 `cn.toml`,插入以下代码并保存: ``` [cn.frontend] @@ -37,7 +49,14 @@ saveQueryResult = "on" // 默认为 off set query_result_timeout = 48 ``` -- 如需全局开启,可在启动 MatrixOne 之前,修改配置文件 `cn.toml`,插入以下代码并保存: +- 对全局开启查询结果保存时间: + +```sql +-- 默认为 24 +set global query_result_timeout = 48 +``` + +全局开启也可在启动 MatrixOne 之前,修改配置文件 `cn.toml`,插入以下代码并保存: ``` [cn.frontend] @@ -57,7 +76,14 @@ __Note:__ 保存时间如果设置的值比上一次设置的短,不影响之 set query_result_maxsize = 200 ``` -- 如需全局开启,可在启动 MatrixOne 之前,修改配置文件 `cn.toml`,插入以下代码并保存: +- 对全局设置查询结果的最大值: + +```sql +-- 默认为 100 +set global query_result_maxsize = 200 +``` + +全局开启也可在启动 MatrixOne 之前,修改配置文件 `cn.toml`,插入以下代码并保存: ``` [cn.frontend] @@ -131,18 +157,15 @@ MODUMP QUERY_RESULT query_id INTO s3_path ## 示例 +- 示例 1 + ```sql --- 开启保存查询结果 mysql> set global save_query_result = on; --- 设置保存时间为 24 小时 mysql> set global query_result_timeout = 24; --- 设置单个查询结果最大值为 100M mysql> set global query_result_maxsize = 200; --- 建表并插入数据 mysql> create table t1 (a int); mysql> insert into t1 values(1); --- 可以查看一下表结构确认插入数据正确 -mysql> select a from t1; +mysql> /* cloud_user */select a from t1; +------+ | a | +------+ @@ -154,11 +177,11 @@ mysql> select last_query_id(); +--------------------------------------+ | last_query_id() | +--------------------------------------+ -| c187873e-c25d-11ed-aa5a-acde48001122 | +| f005ebc6-a3dc-11ee-bb76-26dd28356ef3 | +--------------------------------------+ 1 row in set (0.12 sec) -- 获取这个查询 ID 的查询结果 -mysql> select * from result_scan('c187873e-c25d-11ed-aa5a-acde48001122') as t; +mysql> select * from result_scan('f005ebc6-a3dc-11ee-bb76-26dd28356ef3') as t; +------+ | a | +------+ @@ -166,18 +189,159 @@ mysql> select * from result_scan('c187873e-c25d-11ed-aa5a-acde48001122') as t; +------+ 1 row in set (0.01 sec) -- 查看这个查询 ID 的元数据 -mysql> select * from meta_scan('c187873e-c25d-11ed-aa5a-acde48001122') as t; +mysql> select * from meta_scan('f005ebc6-a3dc-11ee-bb76-26dd28356ef3') as t; +--------------------------------------+------------------+------------+---------+---------------------------------------------------------------------+---------------------+----------------------+--------+---------+---------------------+-----------+ | query_id | statement | account_id | role_id | result_path | create_time | result_size | tables | user_id | expired_time | ColumnMap | +--------------------------------------+------------------+------------+---------+---------------------------------------------------------------------+---------------------+----------------------+--------+---------+---------------------+-----------+ -| c187873e-c25d-11ed-aa5a-acde48001122 | select a from t1 | 0 | 0 | SHARED:/query_result/sys_c187873e-c25d-11ed-aa5a-acde48001122_1.blk | 2023-03-14 19:45:45 | 0.000003814697265625 | t1 | 1 | 2023-03-15 19:45:45 | t1.a -> a | +| f005ebc6-a3dc-11ee-bb76-26dd28356ef3 | select a from t1 | 0 | 0 | SHARED:/query_result/sys_f005ebc6-a3dc-11ee-bb76-26dd28356ef3_1.blk | 2023-12-26 18:53:01 | 0.000003814697265625 | t1 | 0 | 2023-12-27 18:53:01 | a -> a | +--------------------------------------+------------------+------------+---------+---------------------------------------------------------------------+---------------------+----------------------+--------+---------+---------------------+-----------+ -1 row in set (0.00 sec) +1 row in set (0.01 sec) -- 将查询结果保存到本地 -MODUMP QUERY_RESULT c187873e-c25d-11ed-aa5a-acde48001122 INTO 'etl:your_local_path'; +MODUMP QUERY_RESULT 'f005ebc6-a3dc-11ee-bb76-26dd28356ef3' INTO 'etl:your_local_path'; ``` -## 限制 +- 示例 2 + +```sql +mysql> set global save_query_result = on; +mysql> set global query_result_timeout = 24; +mysql> set global query_result_maxsize = 200; +mysql> create table t1 (a int); +mysql> insert into t1 values(1); +mysql> /* save_result */select a from t1; ++------+ +| a | ++------+ +| 1 | ++------+ +1 row in set (0.02 sec) + +mysql> select last_query_id(); ++--------------------------------------+ +| last_query_id() | ++--------------------------------------+ +| afc82394-a45e-11ee-bb9a-26dd28356ef3 | ++--------------------------------------+ +1 row in set (0.00 sec) + +mysql> select * from result_scan('afc82394-a45e-11ee-bb9a-26dd28356ef3') as t; ++------+ +| a | ++------+ +| 1 | ++------+ +1 row in set (0.01 sec) + +mysql> select * from meta_scan('afc82394-a45e-11ee-bb9a-26dd28356ef3') as t; ++--------------------------------------+------------------+------------+---------+---------------------------------------------------------------------+---------------------+----------------------+--------+---------+---------------------+-----------+ +| query_id | statement | account_id | role_id | result_path | create_time | result_size | tables | user_id | expired_time | ColumnMap | ++--------------------------------------+------------------+------------+---------+---------------------------------------------------------------------+---------------------+----------------------+--------+---------+---------------------+-----------+ +| afc82394-a45e-11ee-bb9a-26dd28356ef3 | select a from t1 | 0 | 0 | SHARED:/query_result/sys_afc82394-a45e-11ee-bb9a-26dd28356ef3_1.blk | 2023-12-27 10:21:47 | 0.000003814697265625 | t1 | 0 | 2023-12-28 10:21:47 | a -> a | ++--------------------------------------+------------------+------------+---------+---------------------------------------------------------------------+---------------------+----------------------+--------+---------+---------------------+-----------+ +1 row in set (0.00 sec) +``` + +- 示例 3 + +```sql +mysql> set global save_query_result = on; +mysql> set global query_result_timeout = 24; +mysql> set global query_result_maxsize = 200; +mysql> create table t1 (a int); +mysql> insert into t1 values(1); +mysql> show create table t1; ++-------+--------------------------------------------+ +| Table | Create Table | ++-------+--------------------------------------------+ +| t1 | CREATE TABLE `t1` ( +`a` INT DEFAULT NULL +) | ++-------+--------------------------------------------+ +1 row in set (0.02 sec) + +mysql> select * from meta_scan(last_query_id()) as t; ++--------------------------------------+----------------------+------------+---------+---------------------------------------------------------------------+---------------------+-----------------------+--------+---------+---------------------+----------------------------------------------+ +| query_id | statement | account_id | role_id | result_path | create_time | result_size | tables | user_id | expired_time | ColumnMap | ++--------------------------------------+----------------------+------------+---------+---------------------------------------------------------------------+---------------------+-----------------------+--------+---------+---------------------+----------------------------------------------+ +| 617647f4-a45c-11ee-bb97-26dd28356ef3 | show create table t1 | 0 | 0 | SHARED:/query_result/sys_617647f4-a45c-11ee-bb97-26dd28356ef3_1.blk | 2023-12-27 10:05:17 | 0.0000858306884765625 | | 0 | 2023-12-28 10:05:17 | Table -> Table, Create Table -> Create Table | ++--------------------------------------+----------------------+------------+---------+---------------------------------------------------------------------+---------------------+-----------------------+--------+---------+---------------------+----------------------------------------------+ +1 row in set (0.00 sec) +``` + +- 示例 4 + +```sql +mysql> set global save_query_result = on; +mysql> set global query_result_timeout = 24; +mysql> set global query_result_maxsize = 200; +mysql> create table t1 (a int); +mysql> insert into t1 values(1); +mysql> desc t1; ++-------+---------+------+------+---------+-------+---------+ +| Field | Type | Null | Key | Default | Extra | Comment | ++-------+---------+------+------+---------+-------+---------+ +| a | INT(32) | YES | | NULL | | | ++-------+---------+------+------+---------+-------+---------+ +1 row in set (0.03 sec) + +mysql> select * from meta_scan(last_query_id()) as t; ++--------------------------------------+-----------+------------+---------+---------------------------------------------------------------------+---------------------+---------------------+------------+---------+---------------------+----------------------------------------------------------------------------------------------------------------+ +| query_id | statement | account_id | role_id | result_path | create_time | result_size | tables | user_id | expired_time | ColumnMap | ++--------------------------------------+-----------+------------+---------+---------------------------------------------------------------------+---------------------+---------------------+------------+---------+---------------------+----------------------------------------------------------------------------------------------------------------+ +| 143a54b6-a45d-11ee-bb97-26dd28356ef3 | desc t1 | 0 | 0 | SHARED:/query_result/sys_143a54b6-a45d-11ee-bb97-26dd28356ef3_1.blk | 2023-12-27 10:10:17 | 0.00016021728515625 | mo_columns | 0 | 2023-12-28 10:10:17 | Field -> Field, Type -> Type, Null -> Null, Key -> Key, Default -> Default, Extra -> Extra, Comment -> Comment | ++--------------------------------------+-----------+------------+---------+---------------------------------------------------------------------+---------------------+---------------------+------------+---------+---------------------+----------------------------------------------------------------------------------------------------------------+ +1 row in set (0.00 sec) +``` + +- 示例 5 + +```sql +mysql> CREATE TABLE numbers(pk INTEGER PRIMARY KEY, ui BIGINT UNSIGNED, si BIGINT); +Query OK, 0 rows affected (0.02 sec) + +mysql> INSERT INTO numbers VALUES (0, 0, -9223372036854775808), (1, 18446744073709551615, 9223372036854775807); +Query OK, 2 rows affected (0.01 sec) + +mysql> SET @si_min = -9223372036854775808; +Query OK, 0 rows affected (0.00 sec) + +mysql> PREPARE s2 FROM 'SELECT * FROM numbers WHERE si=?'; +Query OK, 0 rows affected (0.01 sec) + +mysql> EXECUTE s2 USING @si_min; ++------+------+----------------------+ +| pk | ui | si | ++------+------+----------------------+ +| 0 | 0 | -9223372036854775808 | ++------+------+----------------------+ +1 row in set (0.02 sec) + +mysql> select * from meta_scan(last_query_id()) as t; ++--------------------------------------+---------------------------------------------------------------------------------------------------+------------+---------+---------------------------------------------------------------------+---------------------+----------------------+--------+---------+---------------------+------------------------------+ +| query_id | statement | account_id | role_id | result_path | create_time | result_size | tables | user_id | expired_time | ColumnMap | ++--------------------------------------+---------------------------------------------------------------------------------------------------+------------+---------+---------------------------------------------------------------------+---------------------+----------------------+--------+---------+---------------------+------------------------------+ +| e83b8df2-a45d-11ee-bb98-26dd28356ef3 | EXECUTE s2 USING @si_min // SELECT * FROM numbers WHERE si=? ; SET @si_min = -9223372036854775808 | 0 | 0 | SHARED:/query_result/sys_e83b8df2-a45d-11ee-bb98-26dd28356ef3_1.blk | 2023-12-27 10:16:13 | 0.000019073486328125 | | 0 | 2023-12-28 10:16:13 | pk -> pk, ui -> ui, si -> si | ++--------------------------------------+---------------------------------------------------------------------------------------------------+------------+---------+---------------------------------------------------------------------+---------------------+----------------------+--------+---------+---------------------+------------------------------+ +1 row in set (0.00 sec) +``` + +- 示例 6 + +```sql +mysql> set global save_query_result = on; +mysql> set global query_result_timeout = 24; +mysql> set global query_result_maxsize = 200; +mysql> create table t1 (a int); +mysql> insert into t1 values(1); +mysql> select * from t1; ++------+ +| a | ++------+ +| 1 | ++------+ +1 row in set (0.00 sec) -- 只支持保存 `SELECT` 语句和 `SHOW` 语句的结果。 +mysql> select * from meta_scan(last_query_id()) as t; +ERROR 20405 (HY000): file query_result_meta/sys_c16859e4-a462-11ee-bba0-26dd28356ef3.blk is not found +``` \ No newline at end of file diff --git a/docs/MatrixOne/Release-Notes/release-timeline.md b/docs/MatrixOne/Release-Notes/release-timeline.md index c222e3d049..ed94c0d335 100644 --- a/docs/MatrixOne/Release-Notes/release-timeline.md +++ b/docs/MatrixOne/Release-Notes/release-timeline.md @@ -4,6 +4,8 @@ | **版本** | **发布日期** | | :-------------------------- | :----------- | +| [v1.0.2](v1.0.2.md) | 2023/12/23 | +| [v1.0.1](v1.0.1.md) | 2023/12/16 | | [v1.0.0](v1.0.0.md) | 2023/11/13 | | [v1.0.0-rc2](v1.0.0-rc2.md) | 2023/10/24 | | [v1.0.0-rc1](v1.0.0-rc1.md) | 2023/8/24 | diff --git a/docs/MatrixOne/Release-Notes/v1.0.1.md b/docs/MatrixOne/Release-Notes/v1.0.1.md new file mode 100644 index 0000000000..86b90a04f5 --- /dev/null +++ b/docs/MatrixOne/Release-Notes/v1.0.1.md @@ -0,0 +1,43 @@ +# **MatrixOne v1.0.1 发布报告** + +发布日期:2023 年 12 月 16 日 + +MatrixOne 版本:v1.0.1 + +与之前的 v1.0.0 相比,v1.0.1 仅引入了少量系统函数功能,其他均为系统优化和 Bug 修复。 + +### 改进 + +- 重构收集租户存储使用信息量的代码:[#12468](https://github.com/matrixorigin/matrixone/pull/12468) +- 提升锁服务的 P99 性能:[#12760](https://github.com/matrixorigin/matrixone/pull/12760) +- 提升系统可观测性:[#12756](https://github.com/matrixorigin/matrixone/pull/12756) [#12767](https://github.com/matrixorigin/matrixone/pull/12767) [#12801](https://github.com/matrixorigin/matrixone/pull/12756)[#13282](https://github.com/matrixorigin/matrixone/pull/12756)[#13388](https://github.com/matrixorigin/matrixone/pull/12756) +- 增加部分调试命令:[#12772](https://github.com/matrixorigin/matrixone/pull/12772) [#12804](https://github.com/matrixorigin/matrixone/pull/12804) [#12901](https://github.com/matrixorigin/matrixone/pull/12901) +- 优化 CU 的计算统计:[#12925](https://github.com/matrixorigin/matrixone/pull/12925) + +### Bug 修复 + +- 修复部分 MySQL 兼容性问题:[#12753](https://github.com/matrixorigin/matrixone/pull/12753) [#13330](https://github.com/matrixorigin/matrixone/pull/13330) +- 解决了 FileService 缓存大小计算不正确的问题:[#12729](https://github.com/matrixorigin/matrixone/pull/12729) +- 修复了一些系统挂起问题:[#12777](https://github.com/matrixorigin/matrixone/pull/12777) [#13004](https://github.com/matrixorigin/matrixone/pull/13004) [#13227](https://github.com/matrixorigin/matrixone/pull/13227) +- 修改 prefetch 策略以减少内存使用:[#12827](https://github.com/matrixorigin/matrixone/pull/12827) +- 修正了部分创建/删除租户问题:[#12841](https://github.com/matrixorigin/matrixone/pull/12841) [#12863](https://github.com/matrixorigin/matrixone/pull/12863) [#13130](https://github.com/matrixorigin/matrixone/pull/13130) [#13343](https://github.com/matrixorigin/matrixone/pull/13343) +- 解决了 `Show processlist` 的 bug: [#12834](https://github.com/matrixorigin/matrixone/pull/12834) +- 修复大量 SQL 查询堆积的问题:[#12899](https://github.com/matrixorigin/matrixone/pull/12899) [#12923](https://github.com/matrixorigin/matrixone/pull/12923) +- 修复了一些 rpc 错误:[#12884](https://github.com/matrixorigin/matrixone/pull/12884) +- 修复了 go 协程泄漏:[#13312](https://github.com/matrixorigin/matrixone/pull/13312) +- 修复了一些 Lock 相关错误:[#13082](https://github.com/matrixorigin/matrixone/pull/13082) [#13346](https://github.com/matrixorigin/matrixone/pull/13346) +- 修复了 CN 中持续出现的 FATAL 问题:[#13047](https://github.com/matrixorigin/matrixone/pull/13047) +- 修复最大数据包长度计算错误:[#13112](https://github.com/matrixorigin/matrixone/pull/13112) +- 修复了错误的路由问题:[#13103](https://github.com/matrixorigin/matrixone/pull/13103) +- 修复了未预期到的 ckp 停止错误:[#13308](https://github.com/matrixorigin/matrixone/pull/13308) +- 解决事务 DDL 执行结果显示异常的问题:[#13440](https://github.com/matrixorigin/matrixone/pull/13440) +- 修复了 blob 类型编码错误:[#13507](https://github.com/matrixorigin/matrixone/pull/13057) +- 修复了非保留关键字的兼容性错误:[#13501](https://github.com/matrixorigin/matrixone/pull/13051) + +### 功能 + +- 新增 lower,upper,locate 系统函数 + +## 更详细的更新日志 + + \ No newline at end of file diff --git a/docs/MatrixOne/Release-Notes/v1.0.2.md b/docs/MatrixOne/Release-Notes/v1.0.2.md new file mode 100644 index 0000000000..6120a88844 --- /dev/null +++ b/docs/MatrixOne/Release-Notes/v1.0.2.md @@ -0,0 +1,32 @@ +# **MatrixOne v1.0.2 发布报告** + +发布日期:2023 年 12 月 23 日 + +MatrixOne 版本:v1.0.2 + +与之前的 v1.0.1 相比,v1.0.2 仅引入了少量的系统函数和改进,而更专注于对错误的修复。 + +### 改进 + +- 支持等式的传递性:[#13596](https://github.com/matrixorigin/matrixone/pull/13596) + +### 错误修复 + +- 修复了一些保留关键字的错误:[#13561](https://github.com/matrixorigin/matrixone/pull/13561) +- 修复了预取删除的错误:[#13590](https://github.com/matrixorigin/matrixone/pull/13590) +- 修复了与 blob 相关的错误:[#13593](https://github.com/matrixorigin/matrixone/pull/13593) +- 修复了 mo_ctl 合并挂起的问题:[#13601](https://github.com/matrixorigin/matrixone/pull/13601) +- 修复了在左连接时错误地按下运行时过滤器的问题:[#13661](https://github.com/matrixorigin/matrixone/pull/13661) +- 修复了包分区未考虑常量向量的错误:[#13607](https://github.com/matrixorigin/matrixone/pull/13607) +- 修复了本地 FileService 列表中无效符号链接的错误:[#13675](https://github.com/matrixorigin/matrixone/pull/13675) +- 修复了清空缓存过程中异常中断的问题:[#13696](https://github.com/matrixorigin/matrixone/pull/13696) [#13706](https://github.com/matrixorigin/matrixone/pull/13706) [#13708](https://github.com/matrixorigin/matrixone/pull/13708) +- 修复了在某些情况下执行 SHOW SUBSCRIPTIONS 失败的问题:[#13656](https://github.com/matrixorigin/matrixone/pull/13656) [#13599](https://github.com/matrixorigin/matrixone/pull/13656) +- 修复了脏数据块删除错误的问题:[#13647](https://github.com/matrixorigin/matrixone/pull/13647) + +### 功能 + +- 新增 lcase,ucase 系统函数[#13686](https://github.com/matrixorigin/matrixone/pull/13686) + +## 更详细的更新日志 + + \ No newline at end of file diff --git a/docs/MatrixOne/Security/TLS-introduction.md b/docs/MatrixOne/Security/TLS-introduction.md index 120a424e2e..9d8e1bc2d9 100644 --- a/docs/MatrixOne/Security/TLS-introduction.md +++ b/docs/MatrixOne/Security/TLS-introduction.md @@ -109,7 +109,7 @@ MatrixOne 默认采用非加密传输,也支持启用基于 TLS 协议的加 Current pager: stdout Using outfile: '' Using delimiter: ; - Server version: 8.0.30-MatrixOne-v1.0.0 MatrixOne + Server version: 8.0.30-MatrixOne-v1.0.2 MatrixOne Protocol version: 10 Connection: 127.0.0.1 via TCP/IP Server characterset: utf8mb4 @@ -134,7 +134,7 @@ MatrixOne 默认采用非加密传输,也支持启用基于 TLS 协议的加 Current pager: stdout Using outfile: '' Using delimiter: ; - Server version: 8.0.30-MatrixOne-v1.0.0 MatrixOne + Server version: 8.0.30-MatrixOne-v1.0.2 MatrixOne Protocol version: 10 Connection: 127.0.0.1 via TCP/IP Server characterset: utf8mb4 diff --git a/mkdocs.yml b/mkdocs.yml index 2b694198f6..a27739d426 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -66,6 +66,7 @@ nav: - Logtail 协议详解: MatrixOne/Overview/architecture/architecture-logtail.md - 事务与锁机制实现详解: MatrixOne/Overview/architecture/architecture-transaction-lock.md - Proxy 架构详解: MatrixOne/Overview/architecture/architecture-proxy.md + - WAL 技术详解: MatrixOne/Overview/architecture/architecture-wal.md - 数据缓存及冷热数据分离架构详解: MatrixOne/Overview/architecture/architecture-cold-hot-data-separation.md - 流引擎架构详解: MatrixOne/Overview/architecture/streaming.md - 最新动态: MatrixOne/Overview/whats-new.md @@ -507,6 +508,7 @@ nav: - FORMAT(): MatrixOne/Reference/Functions-and-Operators/String/format.md - HEX(): MatrixOne/Reference/Functions-and-Operators/String/hex.md - INSTR(): MatrixOne/Reference/Functions-and-Operators/String/instr.md + - LCASE(): MatrixOne/Reference/Functions-and-Operators/String/lcase.md - LEFT(): MatrixOne/Reference/Functions-and-Operators/String/left.md - LENGTH(): MatrixOne/Reference/Functions-and-Operators/String/length.md - LOCATE(): MatrixOne/Reference/Functions-and-Operators/String/locate.md @@ -524,6 +526,7 @@ nav: - SUBSTRING(): MatrixOne/Reference/Functions-and-Operators/String/substring.md - SUBSTRING_INDEX(): MatrixOne/Reference/Functions-and-Operators/String/substring-index.md - TRIM(): MatrixOne/Reference/Functions-and-Operators/String/trim.md + - UCASE(): MatrixOne/Reference/Functions-and-Operators/String/ucase.md - UPPER(): MatrixOne/Reference/Functions-and-Operators/String/upper.md - 正则表达式: - 正则表达式概述: MatrixOne/Reference/Functions-and-Operators/String/Regular-Expressions/Regular-Expression-Functions-Overview.md @@ -579,6 +582,8 @@ nav: - SQL 常见问题: MatrixOne/FAQs/sql-faqs.md - 版本发布纪要: - 版本发布历史记录: MatrixOne/Release-Notes/release-timeline.md + - v1.0.2: MatrixOne/Release-Notes/v1.0.2.md + - v1.0.1: MatrixOne/Release-Notes/v1.0.1.md - v1.0.0: MatrixOne/Release-Notes/v1.0.0.md - v1.0.0-rc2: MatrixOne/Release-Notes/v1.0.0-rc2.md - v1.0.0-rc1: MatrixOne/Release-Notes/v1.0.0-rc1.md