dtle icon indicating copy to clipboard operation
dtle copied to clipboard

SkipCreateDbTable set to true and dest mysql not create replicate db and table, full replication dosen't complete and not report error

Open asiroliu opened this issue 3 years ago • 0 comments

Description

SkipCreateDbTable set to true and dest mysql not create replicate db and table, full replication dosen't complete and not report error

Steps to reproduce the issue

  1. prepare data
# src_mysql
sql> CREATE DATABASE action_db_1;

shell> sysbench /usr/share/sysbench/oltp_insert.lua --mysql-host=172.100.9.1 --mysql-port=3306 --mysql-user=test --mysql-password=test --create_secondary=off --report-interval=10 --mysql-db=action_db_1 --tables=3 --table_size=2100 prepare
  1. create job
job "test1" {
  datacenters = ["dc1"]
  type = "service"
  group "Src" {
    affinity {
      attribute = "${node.unique.name}"
      value = "dtle-1"
      }
    task "src" {
      driver = "dtle"
      config {
      	DropTableIfExists = false
      	SkipCreateDbTable = true
        ReplicateDoDb = [{
          TableSchema = "action_db_1"
        }]
        ConnectionConfig = {
          Host = "172.100.9.1"
          Port = 3306
          User = "test_src"
          Password = "test_src"
        }
      }
    }
  }
  group "Dest" {
    affinity {
      attribute = "${node.unique.name}"
      value = "dtle-2"
      }
    task "dest" {
      driver = "dtle"
      config {
        ConnectionConfig = {
          Host = "172.100.9.2"
          Port = 3306
          User = "test_dest"
          Password = "test_dest"
        }
      }
    }
  }
}

Describe the results you received

job is running, but the dest mysql have no data. if i send new data on src mysql, the job will be failed. the dtle log such as:

2021-04-07T15:25:12.895+0800 [WARN]  client.driver_mgr.dtle: ApplyEventQueries. ignore error: driver=dtle err="Error 1146: Table 'action_db_1.sbtest1' doesn't exist" job=DropTableIfExists_false_and_SkipCreateDbTable_true @module=dtle.applier timestamp=2021-04-07T15:25:12.895+0800

Describe the results you expected

job should report error at full replication stage.

Output of ./dtle version:**

9.9.9.9-master-71a99c5

Additional information

(e.g. issue happens only occasionally)

Additional details (log, config, job config etc):

asiroliu avatar Apr 07 '21 08:04 asiroliu