Skip to content

Commit 9e11c3c

Browse files
authored
定时保存snapshot到DB的逻辑中,schema名称获取错误,在有配置canal.instance.filter.regex时,由于对应的table无法被匹配中,导致compareTableMetaDbAndMemory方法不被执行 (#3693)
* 避免重复订阅zk变更状态 * Update DatabaseTableMeta.java 获取schema的名称 * Update CanalController.java
1 parent d67bea8 commit 9e11c3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/tsdb/DatabaseTableMeta.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ private boolean applySnapshotToDB(EntryPosition position, boolean init) {
301301
boolean compareAll = true;
302302
for (Schema schema : tmpMemoryTableMeta.getRepository().getSchemas()) {
303303
for (String table : schema.showTables()) {
304-
String fullName = schema + "." + table;
304+
String fullName = schema.getName() + "." + table;
305305
if (blackFilter == null || !blackFilter.filter(fullName)) {
306306
if (filter == null || filter.filter(fullName)) {
307307
// issue : https://github.com/alibaba/canal/issues/1168

0 commit comments

Comments
 (0)