Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PD graceful upgrade #94

Closed
xiaojingchen opened this issue Sep 10, 2018 · 0 comments · Fixed by #99
Closed

PD graceful upgrade #94

xiaojingchen opened this issue Sep 10, 2018 · 0 comments · Fixed by #99
Assignees
Labels
status/WIP Issue/PR is being worked on
Milestone

Comments

@xiaojingchen
Copy link
Contributor

xiaojingchen commented Sep 10, 2018

pd graceful upgrade must evict leader to other member before upgrade the member.
the major logic of pd upgrade:

        for i = replicas - 1; i >= 0; i-- {
		if !canUpgrade(i) {
			continue
		}
		currentLeader := queryLeader()
		if pd[i].memberID != currentLeader {
			upgrade(i)
		} else {
			if i == replicas-1 {
				transferTo(0)
			} else {
				transferTo(replicas - 1)
			}
		}
	}

pd's leader api:

  • query current leader : /pd/api/v1/leader
  • transfer leader to special member : /pd/api/v1/leader/transfer/{memberName}
@weekface weekface added this to the v0.3 milestone Sep 11, 2018
@xiaojingchen xiaojingchen self-assigned this Sep 13, 2018
@xiaojingchen xiaojingchen added the status/WIP Issue/PR is being worked on label Sep 14, 2018
yahonda pushed a commit that referenced this issue Dec 27, 2021
* update docs for br tls

* support specifying secret for backup and restore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/WIP Issue/PR is being worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants