Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: TiDBv5.0.5 版本升级stop tiflash后滚动升级失败

[TiDB Usage Environment] Test
[TiDB Version] 5.0.5
[Reference] 使用 TiUP 升级 TiDB | PingCAP 文档中心
[Reproduction Path]
- tiup and cluster have been upgraded
tiup update --self && tiup update cluster
download https://tiup-mirrors.pingcap.com/tiup-v1.12.2-linux-amd64.tar.gz 7.15 MiB / 7.15 MiB 100.00% 21.92 MiB/s
Updated successfully!
component cluster version v1.12.2 is already installed
Updated successfully!
- Cluster status
Cluster type: tidb
Cluster name: tidb_upgrade_v5
Cluster version: v5.0.5
Deploy user: tidb
SSH type: builtin
Dashboard URL: http://192.168.22.72:3379/dashboard
ID Role Host Ports OS/Arch Status Data Dir Deploy Dir
-- ---- ---- ----- ------- ------ -------- ----------
192.168.22.200:8300 cdc 192.168.22.200 8300 linux/x86_64 Up /data/tidb-data/cdc-8300 /data/tidb4-deploy/cdc-8300
192.168.22.72:3379 pd 192.168.22.72 3379/3380 linux/x86_64 Up|L|UI /data/tidb4-data/pd_3379 /data/tidb4-deploy/pd_3379
192.168.22.161:5000 tidb 192.168.22.161 5000/10180 linux/x86_64 Up - /data/tidb4-deploy/tidb_5000
192.168.22.200:9000 tiflash 192.168.22.200 9000/8123/3930/20170/20292/8234 linux/x86_64 Up /data/tidb4-data/tiflash-9000 /data/tidb4-deploy/tiflash-9000
192.168.22.161:20260 tikv 192.168.22.161 20260/20280 linux/x86_64 Up /data/tidb4-data/tikv_20260 /data/tidb4-deploy/tikv_20260
192.168.22.200:20260 tikv 192.168.22.200 20260/20280 linux/x86_64 Up /data/tidb4-data/tikv_20260 /data/tidb4-deploy/tikv_20260
192.168.22.72:20260 tikv 192.168.22.72 20260/20280 linux/x86_64 Up /data/tidb4-data/tikv_20260 /data/tidb4-deploy/tikv_20260
- stop tiflash
Stopping component tiflash
Stopping instance 192.168.22.200
Stop tiflash 192.168.22.200:9000 success
Stopping component node_exporter
Stopping component blackbox_exporter
Stopped cluster `tidb_upgrade_v5` successfully
- offline upgrade, error:
Error: cluster is running and cannot be upgraded offline
tiup cluster upgrade tidb_upgrade_v5 v6.5.2 --offline
tiup is checking updates for component cluster ...
Starting component `cluster`: /home/tidb/.tiup/components/cluster/v1.12.2/tiup-cluster upgrade tidb_upgrade_v5 v6.5.2 --offline
Before the upgrade, it is recommended to read the upgrade guide at https://docs.pingcap.com/tidb/stable/upgrade-tidb-using-tiup and finish the preparation steps.
This operation will upgrade tidb v5.0.5 cluster tidb_upgrade_v5 to v6.5.2.
Do you want to continue? [y/N]:(default=N) y
Upgrading cluster...
Error: cluster is running and cannot be upgraded offline
Additional Note 1
- After stopping tiflash, there will be an error
TiFlash server timeout
[ 20s ] thds: 1 tps: 0.00 qps: 0.00 (r/w/o: 0.00/0.00/0.00) lat (ms,95%): 0.00 err/s: 0.00 reconn/s: 0.00
[ 30s ] thds: 1 tps: 0.00 qps: 0.00 (r/w/o: 0.00/0.00/0.00) lat (ms,95%): 0.00 err/s: 0.00 reconn/s: 0.00
[ 40s ] thds: 1 tps: 0.00 qps: 0.00 (r/w/o: 0.00/0.00/0.00) lat (ms,95%): 0.00 err/s: 0.00 reconn/s: 0.00
FATAL: mysql_drv_query() returned error 9012 (TiFlash server timeout) for query 'SELECT SUM(k) FROM sbtest1 WHERE id BETWEEN 2497 AND 2596'
FATAL: `thread_run' function failed: /usr/share/sysbench/oltp_common.lua:432: SQL error, errno = 9012, state = 'HY000': TiFlash server timeout
Error in my_thread_global_end(): 1 threads didn't exit
Additional Note 2
- Using
--force
can ensure theoffline
execution is completed, but it is unclear what impact it has on TiDB and whether the upgrade is effective
$ tiup cluster upgrade tidb_upgrade_v5 v6.5.2 --offline --force
tiup is checking updates for component cluster ...
Starting component `cluster`: /home/tidb/.tiup/components/cluster/v1.12.2/tiup-cluster upgrade tidb_upgrade_v5 v6.5.2 --offline --force
...
...
+ [ Serial ] - InitConfig: cluster=tidb_upgrade_v5, user=tidb, host=172.16.22.200, path=/home/tidb/.tiup/storage/cluster/clusters/tidb_upgrade_v5/config-cache/cdc-8300.service, deploy_dir=/data/tidb4-deploy/cdc-8300, data_dir=[/data/tidb-data/cdc-8300], log_dir=/data/tidb4-deploy/cdc-8300/log, cache_dir=/home/tidb/.tiup/storage/cluster/clusters/tidb_upgrade_v5/config-cache
+ [ Serial ] - UpgradeCluster
Upgraded cluster `tidb_upgrade_v5` successfully