diff --git a/CHANGELOG.md b/CHANGELOG.md index a8044e9..d89eec7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ +## Unreleased + +BUG FIXES: + +* Fix buckets discovery (it doesn't freeze now) + ## 0.0.11 FEATURES: + * BucketStat has become a public method (#21) REFACTOR: @@ -23,4 +30,4 @@ FEATURES: REFACTOR: -* refactored place for rs method \ No newline at end of file +* refactored place for rs method diff --git a/discovery.go b/discovery.go index 71e5da5..727ec27 100644 --- a/discovery.go +++ b/discovery.go @@ -203,8 +203,9 @@ func (r *Router) DiscoveryAllBuckets(ctx context.Context) error { knownBucket.Add(1) } - // if TotalBucketCount < BUCKET_CHUNK_SIZE then nextFrom equal zero - if rawReq.From == *nextFrom { + // There are no more buckets + // https://github.com/tarantool/vshard/blob/8d299bfe/vshard/storage/init.lua#L1730 + if nextFrom == nil || *nextFrom == 0 { return nil }