Skip to content
This repository has been archived by the owner on Dec 23, 2024. It is now read-only.

Incomplete ClusterBootstrap method #115

Open
nurzhan-saktaganov opened this issue Dec 17, 2024 · 0 comments
Open

Incomplete ClusterBootstrap method #115

nurzhan-saktaganov opened this issue Dec 17, 2024 · 0 comments
Labels
bug Something isn't working standard what is enshrined in the standard of the original vshard library

Comments

@nurzhan-saktaganov
Copy link
Collaborator

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
}

@nurzhan-saktaganov nurzhan-saktaganov added bug Something isn't working standard what is enshrined in the standard of the original vshard library labels Dec 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working standard what is enshrined in the standard of the original vshard library
Projects
None yet
Development

No branches or pull requests

1 participant