Does upgrading with `tiup cluster upgrade <cluster-name> <version> --force` affect data integrity?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tiup cluster upgrade --force 升级对数据完整性有影响吗

| username: xingzhenxiang

【TiDB Usage Environment】Production Environment
【TiDB Version】
【Reproduction Path】What operations were performed that led to the issue
【Encountered Issue: Issue Symptoms and Impact】
【Resource Configuration】
【Attachments: Screenshots/Logs/Monitoring】

| username: WalterWj | Original post link

No, upgrading is just replacing the binary and restarting.

| username: 裤衩儿飞上天 | Original post link

“Develop cautiously, don’t be reckless. Especially be careful with the production force.”

| username: xingzhenxiang | Original post link

Have you practiced it?

| username: xingzhenxiang | Original post link

I have many TiKV nodes, and I’m afraid there will be problems if I upgrade halfway. Wouldn’t that be more troublesome?

| username: WalterWj | Original post link

Generally, there’s no need to use force. It’s fine if it gets interrupted; tiup has a replay command.

| username: xingzhenxiang | Original post link

I saw the replay. Does the interruption not affect the cluster usage? If it has been checked, is it basically not a big problem?

| username: 裤衩儿飞上天 | Original post link

  1. Issues during the upgrade process are unpredictable.
  2. “Force” means that during the upgrade process, the corresponding node will not perform leader migration and will be forcibly upgraded directly. Without “force,” the node will wait for the leader to be evicted before upgrading. However, if there are many leaders, it seems that if the migration is not completed within 5 minutes, the node will also be forcibly upgraded.
| username: xingzhenxiang | Original post link

How did I understand it as an error after 5 minutes?

| username: 裤衩儿飞上天 | Original post link

force is not an error, it just skips the process of evicting the leader :face_with_raised_eyebrow:

| username: BraveChen | Original post link

It can be used; we have used it in production.

| username: xingzhenxiang | Original post link

Thank you for your reply.

| username: lmdb | Original post link

Currently, I haven’t used force yet. It is recommended to perform an environment check before upgrading.

| username: xingzhenxiang | Original post link

Yes, I’ve checked it several times.

| username: Kongdom | Original post link

I’ve tried it on my end, but our hardware almost doesn’t meet the requirements :rofl: