Closed git-hulk closed 2 months ago
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 | |-------|------------------------------------------|----------------|--------|-----------|
Before running the failover command, the cluster state is:
Then run the failover command with:
And it will get the cluster: