Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: DM全量同步时大量Waiting for global read lock
Task Configuration
name: hawkeye_db
task-mode: all
is-sharding: true
shard-mode: pessimistic
ignore-checking-items:
meta-schema: dm-meta
enable-heartbeat: false
heartbeat-update-interval: 0
heartbeat-report-interval: 0
timezone: “”
case-sensitive: false
collation_compatible: loose
target-database:
host:
port: 4000
user: root
password:
max-allowed-packet: null
session: {}
security: null
mysql-instances:
- source-id: hawkeye_db
meta: null
filter-rules:
column-mapping-rules:
route-rules:- route-01
expression-filters:
black-white-list: “”
block-allow-list: balist-01
mydumper-config-name: dump-01
mydumper:
mydumper-path: ./bin/mydumper
threads: 4
chunk-filesize: “64”
statement-size: 0
rows: 0
where: “”
skip-tz-utc: true
extra-args: --consistency auto
mydumper-thread: 0
loader-config-name: load-01
loader:
pool-size: 16
dir: ./exported_data
import-mode: sql
on-duplicate: replace
loader-thread: 0
syncer-config-name: sync-01
syncer:
meta-file: “”
worker-count: 16
batch: 100
queue-size: 1024
checkpoint-flush-interval: 30
compact: false
multiple-rows: false
max-retry: 0
auto-fix-gtid: false
enable-gtid: false
disable-detect: false
safe-mode: false
enable-ansi-quotes: false
syncer-thread: 0
continuous-validator-config-name: validator-01
online-ddl: true
shadow-table-rules:
trash-table-rules:
online-ddl-scheme: “”
routes:
route-01:
schema-pattern: hawkeye_db
table-pattern: “”
target-schema: tidb_hawkeye_db
target-table: “”
filters: {}
column-mappings: {}
expression-filter: {}
black-white-list: {}
block-allow-list:
balist-01:
do-tables:
do-dbs:- hawkeye_db
ignore-tables:
ignore-dbs:
mydumpers:
dump-01:
mydumper-path: ./bin/mydumper
threads: 4
chunk-filesize: “64”
statement-size: 0
rows: 0
where: “”
skip-tz-utc: true
extra-args: --consistency auto
loaders:
load-01:
pool-size: 16
dir: ./exported_data
import-mode: sql
on-duplicate: replace
syncers:
sync-01:
meta-file: “”
worker-count: 16
batch: 100
queue-size: 1024
checkpoint-flush-interval: 30
compact: false
multiple-rows: false
max-retry: 0
auto-fix-gtid: false
enable-gtid: false
disable-detect: false
safe-mode: false
enable-ansi-quotes: false
validators:
validator-01:
mode: none
worker-count: 4
validate-interval: 10s
check-interval: 5s
row-error-delay: 30m0s
meta-flush-interval: 1m0s
batch-query-size: 100
clean-dump-file: false
ansi-quotes: false
remove-meta: false
experimental:
async-checkpoint-flush: false
- hawkeye_db
- route-01
Business SQL Blocking, How to Solve?
66857391 | hawkeye | 10.157.15.17:57566 | hawkeye_db | Sleep | 42 | | NULL |
| 66857406 | hawkeye | 10.157.15.17:58000 | hawkeye_db | Query | 33 | Waiting for global read lock | INSERT INTO risk_alarm
(
event_id,
event_type,
event_type_str,
|
| 66857437 | hawkeye | 10.157.15.17:58778 | hawkeye_db | Query | 20 | Waiting for global read lock | INSERT INTO risk_alarm
(
event_id,
event_type,
event_type_str,
|
| 66857438 | hawkeye | 10.157.15.17:58790 | hawkeye_db | Query | 20 | Waiting for global read lock | INSERT INTO risk_alarm
(
event_id,
event_type,
event_type_str,
|
| 66857460 | hawkeye-web | 10.157.15.17:59508 | hawkeye_db | Query | 10 | Waiting for global read lock | delete from audit_data_asset
WHERE version != 6469
AND
account = 'd |
| 66857479 | hawkeye | 10.157.15.17:59984 | hawkeye_db | Query | 15 | Waiting for global read lock | INSERT INTO risk_alarm
(
event_id,
event_type,
event_type_str,
|
| 66857482 | hawkeye | 10.157.15.17:60032 | hawkeye_db | Query | 7 | Waiting for global read lock | INSERT INTO risk_alarm
(
event_id,
event_type,
event_type_str,
|
| 66857497 | hawkeye | 10.157.15.17:60414 | hawkeye_db | Query | 9 | Waiting for global read lock | INSERT INTO risk_alarm
(
event_id,
event_type,
event_type_str,
|
| 66857498 | hawkeye | 10.157.15.17:60426 | hawkeye_db | Query | 8 | Waiting for global read lock | INSERT INTO risk_alarm
(
event_id,
event_type,
event_type_str,
|
| 66857511 | dbamgr | 192.168.100.30:8518 | NULL | Query | 0 | starting | show processlist |
| 66857514 | hawkeye-web | 10.157.15.17:60810 | hawkeye_db | Query | 1 | Waiting for global read lock | delete from audit_auth_asset
WHERE version != 2460
AND
account = 't |
| 66857517 | hawkeye | 10.157.15.17:60928 | hawkeye_db | Query | 3 | Waiting for global read lock | INSERT INTO risk_alarm