You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Router used to override :result() method of netbox futures. It is
needed because user functions are called via vshard.storage.call()
which returns some metadata - it must be truncated before
returning the user's data.
It worked fine while netbox futures were implemented as tables.
But in the newest Tarantool most of netbox state machine code is
moved into C. The futures now are cdata.
They allow to add new members, but can't override their methods.
As a result, on the newest Tarantool is_async in
vshard.router.call() simply didn't work.
The patch wraps netbox futures completely with a Lua table, not
just overrides one method. Now it works the same on all Tarantool
versions starting from 1.10.
Closes#294
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
.The text was updated successfully, but these errors were encountered: