Description
Description
when I use dtle to sync table from one mysql to another server.
the job status raises "bad 'where' for table bocai.trainee_center_info: field centerId does not exist"
The table trainee_center_info has the following columns(id, centerId, name, ......), and pk is id, and centerId is the sharding key.
Steps to reproduce the issue
- create table trainee_center_info (id, name, centerId)[id is pk, centerId is sharding key], and insert test data to the test table.
- config the job.json
- use api to add the job
Describe the results you received
[root@slave2 ~]# curl -XGET "10.0.0.72:8190/v1/jobs" | jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2455 0 2455 0 0 554k 0 --:--:-- --:--:-- --:--:-- 599k
[
{
"CreateIndex": 814,
"ID": "9d355a52-fe3d-6d9e-0b8f-725bf9639c24",
"JobModifyIndex": 825,
"JobSummary": {
"Constraints": null,
"CreateIndex": 814,
"Datacenters": [
"dc1"
],
"EnforceIndex": false,
"Failover": false,
"ID": "9d355a52-fe3d-6d9e-0b8f-725bf9639c24",
"JobModifyIndex": 825,
"ModifyIndex": 825,
"Name": "dtle-shard2",
"Orders": null,
"Region": "global",
"Status": "dead",
"StatusDescription": "bad 'where' for table bocai.trainee_center_info: field centerId does not exist",
"Tasks": [
{
"Config": {
"TrafficAgainstLimits": 0,
"NatsAddr": "10.0.0.73:8193",
"ReplicateDoDb": [
{
"Tables": [
{
"TableName": "trainee_center_info",
"Where": "centerId%10000=3"
}
],
"TableSchema": "bocai"
}
],
"ConnectionConfig": {
"User": "root",
"Password": "",
"Host": "10.0.0.5",
"Port": "3306"
}
},
"ConfigLock": {},
"Constraints": null,
"Driver": "MySQL",
"Leader": false,
"NodeID": "",
"NodeName": "",
"Type": "Src"
},
{
"Config": {
"ConnectionConfig": {
"User": "bocai",
"Password": "",
"Host": "rm-bpf13n98b800812s1s3q1o.mysql.rds.aliyuncs.com",
"Port": "3306"
},
"NatsAddr": "10.0.0.73:8193",
"Gtid": ""
},
"ConfigLock": {},
"Constraints": null,
"Driver": "MySQL",
"Leader": true,
"NodeID": "",
"NodeName": "",
"Type": "Dest"
}
],
"Type": "synchronous"
},
"ModifyIndex": 825,
"Name": "dtle-shard2",
"Status": "dead",
"StatusDescription": "bad 'where' for table bocai.trainee_center_info: field centerId does not exist",
"Type": "synchronous"
}
]
Describe the results you expected
Output of ./dtle version
:**
Dtle 2.19.11.0
Additional information
(e.g. issue happens only occasionally)