Skip to content

Incomplete ClusterBootstrap method #17

@nurzhan-saktaganov

Description

@nurzhan-saktaganov

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions