[Tarantool-patches] [PATCH vshard 7/7] router: introduce discovery mode 'once'

Oleg Babin olegrok at tarantool.org
Fri May 1 20:02:44 MSK 2020


Hi! Thanks for the patch. See one nit below.

On 01/05/2020 03:16, Vladislav Shpilevoy wrote:
> Closes #210
> 

> @@ -342,6 +342,13 @@ discovery_f = function(router)
>               unknown_bucket_count =
>                   router.total_bucket_count - router.known_bucket_count
>               if unknown_bucket_count == 0 then
> +                if router.discovery_mode == 'once' then
> +                    log.info("Discovery mode is 'once', and all is "..
> +                             "discovered - shut down the discovery process")
> +                    router.discovery_fiber = nil
> +                    lfiber.self():cancel()
> +                    return
> +                end

I'm not sure that self.cancel is a good approach. I think simple 
"return" should be enough.


More information about the Tarantool-patches mailing list