Просмотр исходного кода

Merge remote-tracking branch 'origin/master' into yjwang

yjwang 3 лет назад
Родитель
Сommit
e232497b39

+ 17 - 10
README.md

@@ -85,8 +85,7 @@ DBSyncer是一款开源的数据同步中间件,提供Mysql、Oracle、SqlServ
 
 ##### Mysql
 * Dump Binlog二进制日志。Master同步Slave, 创建IO线程读取数据,写入relaylog,基于消息订阅捕获增量数据。
-* 配置
-> 修改my.ini文件
+> 修改my.ini文件,重启服务
 ```bash
 #服务唯一ID
 server_id=1
@@ -101,7 +100,6 @@ replicate-do-db=test
 
 ##### Oracle
 * CDN注册订阅。监听增删改事件,得到rowid,根据rowid执行SQL查询,得到变化数据。
-* 配置
 > 授予账号监听权限, 同时要求目标源表必须定义一个长度为18的varchar字段,通过接收rowid值实现增删改操作。
 ```roomsql
 grant change notification to 你的账号
@@ -109,16 +107,25 @@ grant change notification to 你的账号
 
 ##### SqlServer
 * SQL Server 2008提供了内建的方法变更数据捕获(Change Data Capture 即CDC)以实现异步跟踪用户表的数据修改。
-* 配置
 > 要求2008版本以上, 启动代理服务(Agent服务), 连接账号具有 sysadmin 固定服务器角色或 db_owner 固定数据库角色的成员身份。对于所有其他用户,具有源表SELECT 权限;如果已定义捕获实例的访问控制角色,则还要求具有该数据库角色的成员身份。
 
+##### PostgreSQL
+* 通过复制流技术监听增量事件,基于内置插件pgoutput、test_decoding实现解析wal日志
+> 修改postgresql.conf文件,重启服务
+``` shell
+wal_level=logical
+```
+
+##### File
+* 监听文件修改时间得到变化文件,通过文件偏移量读取最新数据
+> [监听文件实现方案](https://gitee.com/ghi/dbsyncer/issues/I55EP5)
+
 ##### ES
 * 定时获取增量数据。
-* 配置
 > 账号具有访问权限。
 
 ##### 日志
-> 建议Mysql和SqlServer都使用日志
+> 建议Mysql、SqlServer、PostgreSQL都使用日志
 
 ![日志](https://images.gitee.com/uploads/images/2021/0906/181036_1f9a9e78_376718.png "日志.png")
 
@@ -144,14 +151,14 @@ grant change notification to 你的账号
 ### 上传插件
 ![上传插件](https://images.gitee.com/uploads/images/2021/0806/232643_9b1f3f64_376718.png "上传插件.png")
 
-## 🔗开发依赖
-* [JDK - 1.8.0_40](https://www.oracle.com/java/technologies/jdk8-downloads.html)(推荐版本以上)
-* [Maven - 3.3.9](https://dlcdn.apache.org/maven/maven-3/)(推荐版本以上)
-
 ## 🎨设计
 #### 架构图
 <img src="http://assets.processon.com/chart_image/5d63b0bce4b0ac2b61877037.png" />
 
+## 🔗开发依赖
+* [JDK - 1.8.0_40](https://www.oracle.com/java/technologies/jdk8-downloads.html)(推荐版本以上)
+* [Maven - 3.3.9](https://dlcdn.apache.org/maven/maven-3/)(推荐版本以上)
+
 ## ⚙️手动编译
 > 先确保环境已安装JDK和Maven
 ```bash

+ 1 - 1
dbsyncer-biz/pom.xml

@@ -5,7 +5,7 @@
 	<parent>
         <artifactId>dbsyncer</artifactId>
         <groupId>org.ghi</groupId>
-        <version>1.1.7-Beta</version>
+        <version>1.1.8-Beta</version>
     </parent>
 	<modelVersion>4.0.0</modelVersion>
 	<artifactId>dbsyncer-biz</artifactId>

+ 1 - 1
dbsyncer-cache/pom.xml

@@ -4,7 +4,7 @@
 	<parent>
         <artifactId>dbsyncer</artifactId>
         <groupId>org.ghi</groupId>
-        <version>1.1.7-Beta</version>
+        <version>1.1.8-Beta</version>
     </parent>
 	<modelVersion>4.0.0</modelVersion>
 	<artifactId>dbsyncer-cache</artifactId>

+ 1 - 1
dbsyncer-cluster/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>dbsyncer</artifactId>
         <groupId>org.ghi</groupId>
-        <version>1.1.7-Beta</version>
+        <version>1.1.8-Beta</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <artifactId>dbsyncer-cluster</artifactId>

+ 1 - 1
dbsyncer-common/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>dbsyncer</artifactId>
         <groupId>org.ghi</groupId>
-        <version>1.1.7-Beta</version>
+        <version>1.1.8-Beta</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <artifactId>dbsyncer-common</artifactId>

+ 1 - 1
dbsyncer-connector/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>dbsyncer</artifactId>
         <groupId>org.ghi</groupId>
-        <version>1.1.7-Beta</version>
+        <version>1.1.8-Beta</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <artifactId>dbsyncer-connector</artifactId>

+ 1 - 1
dbsyncer-connector/src/main/java/org/dbsyncer/connector/file/FileConnector.java

@@ -170,7 +170,7 @@ public final class FileConnector extends AbstractConnector implements Connector<
                 });
                 return StringUtil.join(array.toArray(), separator);
             }).collect(Collectors.toList());
-            IOUtils.writeLines(lines, null, output, "UTF-8");
+            IOUtils.writeLines(lines, System.lineSeparator(), output, "UTF-8");
         } catch (Exception e) {
             result.addFailData(data);
             result.getError().append(e.getMessage()).append(System.lineSeparator());

+ 1 - 1
dbsyncer-listener/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>dbsyncer</artifactId>
         <groupId>org.ghi</groupId>
-        <version>1.1.7-Beta</version>
+        <version>1.1.8-Beta</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <artifactId>dbsyncer-listener</artifactId>

+ 1 - 1
dbsyncer-manager/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>dbsyncer</artifactId>
         <groupId>org.ghi</groupId>
-        <version>1.1.7-Beta</version>
+        <version>1.1.8-Beta</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <artifactId>dbsyncer-manager</artifactId>

+ 1 - 1
dbsyncer-monitor/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>dbsyncer</artifactId>
         <groupId>org.ghi</groupId>
-        <version>1.1.7-Beta</version>
+        <version>1.1.8-Beta</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <artifactId>dbsyncer-monitor</artifactId>

+ 1 - 1
dbsyncer-parser/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>dbsyncer</artifactId>
         <groupId>org.ghi</groupId>
-        <version>1.1.7-Beta</version>
+        <version>1.1.8-Beta</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <artifactId>dbsyncer-parser</artifactId>

+ 1 - 1
dbsyncer-plugin/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>dbsyncer</artifactId>
         <groupId>org.ghi</groupId>
-        <version>1.1.7-Beta</version>
+        <version>1.1.8-Beta</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <artifactId>dbsyncer-plugin</artifactId>

+ 1 - 1
dbsyncer-storage/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>dbsyncer</artifactId>
         <groupId>org.ghi</groupId>
-        <version>1.1.7-Beta</version>
+        <version>1.1.8-Beta</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <artifactId>dbsyncer-storage</artifactId>

+ 1 - 1
dbsyncer-web/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>dbsyncer</artifactId>
         <groupId>org.ghi</groupId>
-        <version>1.1.7-Beta</version>
+        <version>1.1.8-Beta</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <artifactId>dbsyncer-web</artifactId>

+ 1 - 1
dbsyncer-web/src/main/resources/application.properties

@@ -25,7 +25,7 @@ management.endpoints.web.exposure.include=*
 management.endpoint.health.show-details=always
 management.health.elasticsearch.enabled=false
 info.app.name=DBSyncer
-info.app.version=1.1.7-Beta
+info.app.version=1.1.8-Beta
 info.app.copyright=&copy;2021 ${info.app.name}(${info.app.version})<footer>Designed By <a href='https://gitee.com/ghi/dbsyncer' target='_blank' >AE86</a></footer>
 
 #All < Trace < Debug < Info < Warn < Error < Fatal < OFF

+ 1 - 1
pom.xml

@@ -6,7 +6,7 @@
 
     <groupId>org.ghi</groupId>
     <artifactId>dbsyncer</artifactId>
-    <version>1.1.7-Beta</version>
+    <version>1.1.8-Beta</version>
     <packaging>pom</packaging>
     <name>dbsyncer</name>
     <url>https://gitee.com/ghi/dbsyncer</url>