After netbox was reworked, vshard router's future:wait_result() got broken. This is because the router tried to replace the result method of future with a wrapper, which would remove the service values internal to the router.
It seems the new netbox future objects do not check their __index for methods, so the methods can't be overridden.
This is my fault, because I relied on a non-documented feature of being able to add stuff to the future object. A fix would be to wrap netbox futures with a Lua table in vshard, which would have special methods. At least the ones which return the request result.
It seems to be affecting only router's public API. Internal code like discovery used raw netbox futures and does not look broken. At least the tests pass. The now broken tests are router/router.test.lua and failover/failover.test.lua.
After netbox was reworked, vshard router's
future:wait_result()
got broken. This is because the router tried to replace the result method of future with a wrapper, which would remove the service values internal to the router.It seems the new netbox future objects do not check their
__index
for methods, so the methods can't be overridden.This is my fault, because I relied on a non-documented feature of being able to add stuff to the future object. A fix would be to wrap netbox futures with a Lua table in vshard, which would have special methods. At least the ones which return the request result.
It seems to be affecting only router's public API. Internal code like discovery used raw netbox futures and does not look broken. At least the tests pass. The now broken tests are
router/router.test.lua
andfailover/failover.test.lua
.