tiflow icon indicating copy to clipboard operation
tiflow copied to clipboard

when sink mysql lack drop PRIVILEGES, cdc couldn't give error message timely,more than one hour,no error message

Open RenlySir opened this issue 1 year ago • 0 comments

What did you do?

tidb 6.2.0 -> cdc 6.2.0 -> mysql 8.0 description: mysql8 user poctest no DROP PRIVILEGES,but cdc alawys normal, no any error message;

1.mysql8 user poctest PRIVILEGES, mysql> show grants; +-----------------------------------------------------------------------------------------------------------------------------------------------------------+ | Grants for poctest@% | +-----------------------------------------------------------------------------------------------------------------------------------------------------------+ | GRANT SELECT, RELOAD, REPLICATION SLAVE, REPLICATION CLIENT ON . TO poctest@% | | GRANT ALL PRIVILEGES ON cdcdb.* TO poctest@% | | GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, CREATE VIEW, SHOW VIEW ON evaluate.* TO poctest@% | +-----------------------------------------------------------------------------------------------------------------------------------------------------------+ 3 rows in set (0.00 sec)

2.tidb op : mysql> show create table t1 \G; *************************** 1. row *************************** Table: t1 Create Table: CREATE TABLE t1 ( id int(11) NOT NULL, col1 int(11) DEFAULT NULL, col2 int(11) DEFAULT NULL, PRIMARY KEY (id) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin 1 row in set (0.00 sec)

ERROR: No query specified

create table t3 like t1; insert into t3 select * from t1;

drop table t3

3.cdc changefeed query [tidb@presales-41 ~]$ tiup cdc:v6.2.0 cli changefeed list --pd=http://172.16.11.45:2381 Starting component cdc: /home/tidb/.tiup/components/cdc/v6.2.0/cdc /home/tidb/.tiup/components/cdc/v6.2.0/cdc cli changefeed list --pd=http://172.16.11.45:2381 [ { "id": "6aa255c1-4017-4546-a8fa-1043453ce587", "namespace": "default", "summary": { "state": "normal", "tso": 436115501228490765, "checkpoint": "2022-09-20 12:36:50.033", "error": null } } ] [tidb@presales-41 ~]$ tiup cdc:v6.2.0 cli changefeed query -s --pd=http://172.16.11.45:2381 --changefeed-id=6aa255c1-4017-4546-a8fa-1043453ce587 Starting component cdc: /home/tidb/.tiup/components/cdc/v6.2.0/cdc /home/tidb/.tiup/components/cdc/v6.2.0/cdc cli changefeed query -s --pd=http://172.16.11.45:2381 --changefeed-id=6aa255c1-4017-4546-a8fa-1043453ce587 { "upstream_id": 7125745264241895922, "namespace": "default", "id": "6aa255c1-4017-4546-a8fa-1043453ce587", "state": "normal", "checkpoint_tso": 436115501228490765, "checkpoint_time": "2022-09-20 12:36:50.033", "error": null } [tidb@presales-41 ~]$

checkpoint always 436115501228490765,do not push,but no any error,even after one hour

4.mysql8,i give drop PRIVILEGES to poctest GRANT DROP ON evaluate.* TO poctest@% ; mysql> show grants; +-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Grants for poctest@% | +-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | GRANT SELECT, RELOAD, REPLICATION SLAVE, REPLICATION CLIENT ON . TO poctest@% | | GRANT ALL PRIVILEGES ON cdcdb.* TO poctest@% | | GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, CREATE VIEW, SHOW VIEW ON evaluate.* TO poctest@% |

5.query cdc,changefeed can do work, and mysql8 get data

What did you expect to see?

cdc should give error timely,at least within 5 minutes;

What did you see instead?

after one hour,cdc doesn't give any error message to me.

Versions of the cluster

Upstream TiDB cluster version (execute SELECT tidb_version(); in a MySQL client):

mysql> SELECT tidb_version(); +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | tidb_version() | +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Release Version: v6.2.0 Edition: Community Git Commit Hash: daf2b17cdfe30c02ce282361009fb5bdb05f2b0e Git Branch: heads/refs/tags/v6.2.0 UTC Build Time: 2022-08-22 13:47:05 GoVersion: go1.18.5 Race Enabled: false TiKV Min Version: 6.2.0-alpha Check Table Before Drop: false Store: tikv | +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec)

mysql>

Upstream TiKV version (execute tikv-server --version):

[root@presales-45 bin]# ./tikv-server --version TiKV Release Version: 6.2.0 Edition: Community Git Commit Hash: 4f717716a515a8047d91f4cbeef219f41c20dc2c Git Commit Branch: heads/refs/tags/v6.2.0 UTC Build Time: 2022-08-22 04:33:01 Rust Version: rustc 1.62.0-nightly (7c4b47696 2022-04-30) Enable Features: pprof-fp jemalloc mem-profiling portable sse test-engine-kv-rocksdb test-engine-raft-raft-engine cloud-aws cloud-gcp cloud-azure Profile: dist_release [root@presales-45 bin]#

TiCDC version (execute cdc version):

[tidb@presales-41 v6.2.0]$ ./cdc version Release Version: v6.2.0 Git Commit Hash: c0eaa0075d46e3011225796c7f060e2a5d903a77 Git Branch: heads/refs/tags/v6.2.0 UTC Build Time: 2022-08-08 10:05:10 Go Version: go version go1.18.5 linux/amd64 Failpoint Build: false

RenlySir avatar Sep 20 '22 05:09 RenlySir