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

发现了一处可能是代码bug #1728

Open
donniezhangzq opened this issue Jan 10, 2021 · 2 comments
Open

发现了一处可能是代码bug #1728

donniezhangzq opened this issue Jan 10, 2021 · 2 comments

Comments

@donniezhangzq
Copy link

donniezhangzq commented Jan 10, 2021

func (ctx *context) toReplicaGroups(gid int, p *models.Proxy) [][]string {
	g := ctx.group[gid]
	switch {
	case g == nil:
		return nil
	case g.Promoting.State != models.ActionNothing:
		return nil
	case len(g.Servers) <= 1:
		return nil
	}

这里的g.Promoting.State != models.ActionNothing: 会导致停写状态是,主得到的读拓扑是空的,会导致所以的读流量都到主上,这里是出于什么考虑写的呢,有特殊用意吗

@spinlock
Copy link
Member

没记错的话,数据迁移过程中,流量都打给主,因为迁移动作是主在执行,访问从可能会访问到更多的不一致数据

@hiqsociety
Copy link

#1721
can do pull request to this?

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

No branches or pull requests

3 participants