in vshard/router/init.lua const DISCOVERY_INTERVAL is present, which effects version < 1.10.
discovery_f = function(router)
local module_version = M.module_version
while module_version == M.module_version do
while not next(router.replicasets) do
lfiber.sleep(consts.DISCOVERY_INTERVAL)
end
local old_replicasets = router.replicasets
for rs_uuid, replicaset in pairs(router.replicasets) do
local active_buckets, err =
replicaset:callro('vshard.storage.buckets_discovery', {},
{timeout = 2})
while M.errinj.ERRINJ_LONG_DISCOVERY do
M.errinj.ERRINJ_LONG_DISCOVERY = 'waiting'
lfiber.sleep(0.01)
end
-- Renew replicasets object captured by the for loop
-- in case of reconfigure and reload events.
if router.replicasets ~= old_replicasets then
break
end
if not active_buckets then
log.error('Error during discovery %s: %s', replicaset, err)
else
discovery_handle_buckets(router, replicaset, active_buckets)
end
lfiber.sleep(consts.DISCOVERY_INTERVAL)
end
end
end
in vshard/router/init.lua const
DISCOVERY_INTERVAL
is present, which effects version < 1.10.in consts.lua, it is missing.