dtle
dtle copied to clipboard
the full-copy may not implement when recreate a job with the same name
Description
Steps to reproduce the issue
- create a job named demo1
- delete the job after full-copy finished, "curl -XDELETE x.x.x.x:4646/v1/job/dtle-demo1?purge=true"
- create another job using the same name :demo1
Describe the results you received
the second job doesn't implement full-copy
Describe the results you expected
the second job implement full-copy normally
Output of ./dtle version
:**
3.21.01.0-3.21.01.0-382c535
9.9.9.9-master-9d3a080
Additional information
key of dtle/demo1/gtid stored in consul wasn't removed after demo1 deleted
NOTE: dtle has no way to know the action occurs because of which one of the following cases
- job is deleted by user. then dtle/demo1/gtid stored in consul should be removed
- job will be deleted and then recreate when something wrong happen and nomad want to restart the job. then dtle/demo1/gtid stored in consul is expected to be keeped.
Additional details (log, config, job config etc):
job.json
{
"Job": {
"ID": "demo1",
"Datacenters": [
"dc1"
],
"TaskGroups": [
{
"Name": "src",
"Tasks": [
{
"Name": "src",
"Driver": "dtle",
"Config": {
"SkipIncrementalCopy": true,
"Gtid": "",
"ReplicateDoDb": [
],
"ConnectionConfig": {
"Host": "127.0.0.1",
"Port": 3307,
"User": "test",
"Password": "test"
}
}
}
]
},
{
"Name": "dest",
"Tasks": [
{
"Name": "dest",
"Driver": "dtle",
"Config": {
"ConnectionConfig": {
"Host": "127.0.0.1",
"Port": 3308,
"User": "test",
"Password": "test"
}
}
}
]
}
]
}
}