dtle icon indicating copy to clipboard operation
dtle copied to clipboard

the full-copy may not implement when recreate a job with the same name

Open ColdWaterLW opened this issue 3 years ago • 0 comments

Description

Steps to reproduce the issue

  1. create a job named demo1
  2. delete the job after full-copy finished, "curl -XDELETE x.x.x.x:4646/v1/job/dtle-demo1?purge=true"
  3. 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

  1. job is deleted by user. then dtle/demo1/gtid stored in consul should be removed
  2. 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"
              }
            }
          }
        ]
      }
    ]
  }
}

ColdWaterLW avatar Mar 05 '21 02:03 ColdWaterLW