3.1.0 tiflash能启动但是不生效

从3.1.0 bete2升级上来,用查看store状态是up,但是对表增加tiflash副本一直是0

而且tiflash节点日志非常多

image

监控发现node_exporter down了 但是检查tiflash节点并没有什么异常

不知道是哪里出了问题

你好,

tiflash 部署成功后需要通过 ALTER TABLE table_name SET TIFLASH REPLICA count 来选择需要在 tiflash 中创建副本的表的规则,可以看文档操作下。

执行了,就是这张表的进度一直是0

你好,

  1. 目前 tidb 版本是多少?
  2. 请上传下执行 ALTER TABLE table_name SET TIFLASH REPLICA count 这个时间点的 tiflash 日志,这边分析下。

测试使用 tiflash 目前建议在 tidb v4.0.0-rc 上使用

版本是3.1.0 rc

这是tidb.log

[2020/04/28 10:57:51.328 +08:00] [INFO] [set.go:192] ["set session var"] [conn=95733] [name=profiling] [val=1]
[2020/04/28 10:57:51.333 +08:00] [INFO] [session.go:1978] ["CRUCIAL OPERATION"] [conn=95733] [schemaVersion=10995] [cur_db=test] [sql="ALTER TABLE stock SET TIFLASH REPLICA 1"] [user=root@192.168.0.250]
[2020/04/28 10:57:51.344 +08:00] [INFO] [ddl_worker.go:243] ["[ddl] add DDL jobs"] ["batch count"=1] [jobs="ID:10169, Type:set tiflash replica, State:none, SchemaState:none, SchemaID:1, TableID:9215, RowCount:0, ArgLen:1, start time: 2020-04-28 10:57:51.321 +0800 CST, Err:<nil>, ErrCount:0, SnapshotVersion:0; "]
[2020/04/28 10:57:51.344 +08:00] [INFO] [ddl.go:667] ["[ddl] start DDL job"] [job="ID:10169, Type:set tiflash replica, State:none, SchemaState:none, SchemaID:1, TableID:9215, RowCount:0, ArgLen:1, start time: 2020-04-28 10:57:51.321 +0800 CST, Err:<nil>, ErrCount:0, SnapshotVersion:0"] [query="ALTER TABLE stock SET TIFLASH REPLICA 1"]
[2020/04/28 10:57:51.346 +08:00] [INFO] [ddl_worker.go:536] ["[ddl] run DDL job"] [worker="worker 1, tp general"] [job="ID:10169, Type:set tiflash replica, State:none, SchemaState:none, SchemaID:1, TableID:9215, RowCount:0, ArgLen:0, start time: 2020-04-28 10:57:51.321 +0800 CST, Err:<nil>, ErrCount:0, SnapshotVersion:0"]
[2020/04/28 10:57:51.361 +08:00] [INFO] [domain.go:124] ["diff load InfoSchema success"] [usedSchemaVersion=10995] [neededSchemaVersion=10996] ["start time"=1.870999ms] [tblIDs="[]"]
[2020/04/28 10:57:51.409 +08:00] [INFO] [ddl_worker.go:717] ["[ddl] wait latest schema version changed"] [worker="worker 1, tp general"] [ver=10996] ["take time"=51.102207ms] [job="ID:10169, Type:set tiflash replica, State:done, SchemaState:public, SchemaID:1, TableID:9215, RowCount:0, ArgLen:1, start time: 2020-04-28 10:57:51.321 +0800 CST, Err:<nil>, ErrCount:0, SnapshotVersion:0"]
[2020/04/28 10:57:51.413 +08:00] [INFO] [ddl_worker.go:342] ["[ddl] finish DDL job"] [worker="worker 1, tp general"] [job="ID:10169, Type:set tiflash replica, State:synced, SchemaState:public, SchemaID:1, TableID:9215, RowCount:0, ArgLen:0, start time: 2020-04-28 10:57:51.321 +0800 CST, Err:<nil>, ErrCount:0, SnapshotVersion:0"]
[2020/04/28 10:57:51.422 +08:00] [INFO] [ddl.go:699] ["[ddl] DDL job is finished"] [jobID=10169]
[2020/04/28 10:57:51.422 +08:00] [INFO] [domain.go:578] ["performing DDL change, must reload"]
[2020/04/28 10:57:55.280 +08:00] [INFO] [set.go:192] ["set session var"] [conn=95733] [name=profiling] [val=1]
[2020/04/28 10:57:55.570 +08:00] [INFO] [http_handler.go:105] ["[\n {\n  \"id\": 8740,\n  \"replica_count\": 1,\n  \"location_labels\": [],\n  \"available\": false\n },\n {\n  \"id\": 8236,\n  \"replica_count\": 1,\n  \"location_labels\": [],\n  \"available\": false\n },\n {\n  \"id\": 9215,\n  \"replica_count\": 1,\n  \"location_labels\": [],\n  \"available\": false\n }\n]"]
[2020/04/28 10:57:55.579 +08:00] [INFO] [http_handler.go:795] ["handle flash replica report"] ["table ID"=8740] ["region count"=1] ["flash region count"=0] []
[2020/04/28 10:57:55.587 +08:00] [INFO] [http_handler.go:795] ["handle flash replica report"] ["table ID"=8236] ["region count"=1287] ["flash region count"=0] []
[2020/04/28 10:57:55.597 +08:00] [INFO] [http_handler.go:795] ["handle flash replica report"] ["table ID"=9215] ["region count"=20] ["flash region count"=0] []

稍等,这边看下

你好,

不知道目前的部署方式是?

可以使用 tiup 升级到 4.0-rc 体验下 tiflash

我是用3.1rc的教程升级的,目前生产还是3.0.12,直接升4.0没问题吗

你好,

测试环境直接升 4.0-rc 就可以,4.0 比 3.1目前要稳定些,。升级参考上面的连接即可,注意图中的警告

好的 我测试一下 谢谢

感谢支持,