Skip to content

Conversation

@git-hulk
Copy link
Member

@git-hulk git-hulk commented May 4, 2024

Before running the failover command, the cluster state is:

|-------|------------------------------------------|----------------|--------|-----------|
| SHARD |                 NODE ID                  |    ADDRESS     |  ROLE  | MIGRATING |
|-------|------------------------------------------|----------------|--------|-----------|
|     0 | YNgiFCBjjRYJYA3k9kyGmQrCESfgQdMhmQrdfG1g | 127.0.0.1:7770 | MASTER | NO        |
|     0 | gJy7c9V7Yn1DHMdOrNSrUBtqW4AroOFsHHuk6mLy | 127.0.0.1:7771 | SLAVE  | NO        |
|-------|------------------------------------------|----------------|--------|-----------|

Then run the failover command with:

❯ ./_build/kvctl failover shard 0 -n test-ns -c test-cluster
failover shard 0 successfully, new master id: gJy7c9V7Yn1DHMdOrNSrUBtqW4AroOFsHHuk6mLy.

And it will get the cluster:

|-------|------------------------------------------|----------------|--------|-----------|
| SHARD |                 NODE ID                  |    ADDRESS     |  ROLE  | MIGRATING |
|-------|------------------------------------------|----------------|--------|-----------|
|     0 | YNgiFCBjjRYJYA3k9kyGmQrCESfgQdMhmQrdfG1g | 127.0.0.1:7770 | SLAVE  | NO        |
|     0 | gJy7c9V7Yn1DHMdOrNSrUBtqW4AroOFsHHuk6mLy | 127.0.0.1:7771 | MASTER | NO        |
|-------|------------------------------------------|----------------|--------|-----------|

@git-hulk git-hulk requested review from PragmaTwice, jihuayu and torwig May 4, 2024 03:17
@git-hulk git-hulk merged commit ce3cfb6 into apache:unstable May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants