Skip to content

dtle ha - kill or stop dest dtle at full repl stage cause src MySQL Waiting for table metadata lock when execute ddl #904

Closed
@asiroliu

Description

@asiroliu

Description

dtle ha - kill or stop dest dtle at full repl stage cause src MySQL Waiting for table metadata lock when execute ddl

Steps to reproduce the issue

  1. create dtle job2.
job.json
{
  "job_id": "kill_dest_dtle_full_repl",
  "is_password_encrypted": true,
  "task_step_name": "all",
  "failover": true,
  "retry": 2,
  "src_task": {
    "task_name": "src",
    "node_id": "9ec8e26d-81f1-cbdb-ca7d-34a955aef901",
    "mysql_src_task_config": {
      "gtid": "",
      "binlog_relay": false
    },
    "drop_table_if_exists": true,
    "skip_create_db_table": false,
    "repl_chan_buffer_size": 120,
    "chunk_size": 1,
    "group_max_size": 1,
    "group_timeout": 100,
    "connection_config": {
      "database_type": "MySQL",
      "host": "172.100.9.2",
      "port": 3306,
      "user": "test_src",
      "password": "wg3VHFuOiamoLXWi63NRxrlwLIc2QhWumQoloqXJr2sdlcCCiQr0+zMji2L5wWeLsUUJyBjjfR7u4jVdfSJo6WjDzqVr93k+9L/bo1glxpeYEfifkeThQmoFtKu992LIgr2bpmEyuBF+NyvQnCCvWZYlYZrhdY1wJQBghoNznF0="
    },
    "replicate_do_db": [
      {
        "table_schema": "action_db_1",
        "tables": [
          {
            "table_name": "sbtest1"
          }
        ]
      }
    ]
  },
  "dest_task": {
    "task_name": "dest",
    "node_id": "d6bf03c4-5716-8656-68c3-6c0aa6201422",
    "mysql_dest_task_config": {
      "use_my_sql_dependency": false,
      "dependency_history_size": 2500,
      "parallel_workers": 32
    },
    "connection_config": {
      "database_type": "MySQL",
      "host": "172.100.9.1",
      "port": 3306,
      "user": "test_dest",
      "password": "L/bz/aGlaPYb1Ohn5js7ad/vGEb/9jTzjvHpYCIiJ4Kuuo8XAPAR0TMMXBALXKwOo5NWnHT+mP94LQIOngFsModPSKCMtOPTYbQ2Z9lgjCsBL4f2YyqM7AruY69x9L0c7tZ9T9OkWuGAUbny7WTAyJfwUWB+6kThpQNvHVp9Yj0="
    }
  }
}
  1. kill or stop dest dtle when job is full repl stage
shell> pgrep nomad | xargs -r -n 1 kill -9
shell> pgrep dtle | xargs -r -n 1 kill -9

shell> systemctl stop dtle-nomad
  1. wait for dtle ha finished
  2. src MySQL execute ddl and it's blocked
SQL> DROP DATABASE IF EXISTS `action_db_1`;
  1. open other MySQL client
mysql> show processlist;
+----+----------+---------------------+------+------------------+------+---------------------------------------------------------------+---------------------------------------+
| Id | User     | Host                | db   | Command          | Time | State                                                         | Info                                  |
+----+----------+---------------------+------+------------------+------+---------------------------------------------------------------+---------------------------------------+
| 17 | test_src | 172.100.9.12:43784  | NULL | Sleep            |  111 |                                                               | NULL                                  |
| 18 | test_src | 172.100.9.12:52076  | NULL | Sleep            |   93 |                                                               | NULL                                  |
| 19 | test_src | 172.100.9.12:52086  | NULL | Sleep            |   84 |                                                               | NULL                                  |
| 22 | test_src | 172.100.9.12:60062  | NULL | Binlog Dump GTID |   84 | Master has sent all binlog to slave; waiting for more updates | NULL                                  |
| 28 | test     | 172.100.9.253:59784 | NULL | Query            |   26 | Waiting for table metadata lock                               | DROP DATABASE IF EXISTS `action_db_1` |
| 29 | test     | localhost           | NULL | Query            |    0 | starting                                                      | show processlist                      |
+----+----------+---------------------+------+------------------+------+---------------------------------------------------------------+---------------------------------------+

Output of ./dtle version:**

9.9.9.9-master-8ae751b

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions