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

Incomplete ClusterBootstrap method #17

Open
nurzhan-saktaganov opened this issue Jan 9, 2025 · 0 comments
Open

Incomplete ClusterBootstrap method #17

nurzhan-saktaganov opened this issue Jan 9, 2025 · 0 comments

Comments

@nurzhan-saktaganov
Copy link
Contributor

Original: KaymeKaydex/go-vshard-router#115

ClusterBootstrap method doesn't fully reflect what tnt vshard router'r cluster_bootstrap does.
Use tnt vshard router as reference to fix that:
https://github.com/tarantool/vshard/blob/e1c806e1d3d2ce8a4e6b4d498c09051bf34ab92a/vshard/router/init.lua#L1642

go-vshard-router/vshard.go

Lines 386 to 397 in 0a8677f

func (r *Router) ClusterBootstrap(ctx context.Context, ifNotBootstrapped bool) error {
rssToBootstrap := make([]Replicaset, 0, len(r.idToReplicaset))
var lastErr error
for _, rs := range r.idToReplicaset {
rssToBootstrap = append(rssToBootstrap, *rs)
}
err := CalculateEtalonBalance(rssToBootstrap, r.cfg.TotalBucketCount)
if err != nil {
return err
}

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

1 participant