-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
map_callrw can't find c stored procedure #436
Comments
Thank you for digging! The issue is blocked by tarantool/tarantool#9131 |
Can we just always use |
Sure, we can. But it doesn't change the fact, that |
It does mean that the ticket is not blocked though. I suggest we drop the 'blocked' label. |
Serpentian
added a commit
to Serpentian/vshard
that referenced
this issue
Sep 18, 2023
Currently, if function was created as C stored procedure with box.schema.func.create, all types of router.call and router.map_callrw cannot find it and return `Procedure 'name' is not defined` error. This is cased by the fact that both of these function use local_call, which invokes net_box.self.call, which doesn't currently work with C stored procedures due to the bug. Let's use box.func, where it's possible instead of net_box.self.call in local_call. Closes tarantool#436 NO_DOC=bugfix NO_TEST=<already tested>
Serpentian
added a commit
to Serpentian/vshard
that referenced
this issue
Sep 18, 2023
Currently, if function was created as C stored procedure with box.schema.func.create, all types of router.call and router.map_callrw cannot find it and return `Procedure 'name' is not defined` error. This is cased by the fact that both of these function use local_call, which invokes net_box.self.call, which doesn't currently work with C stored procedures due to the bug. Let's use box.func, where it's possible instead of net_box.self.call in local_call. Closes tarantool#436 NO_DOC=bugfix NO_TEST=<already tested>
Serpentian
added a commit
to Serpentian/vshard
that referenced
this issue
Sep 25, 2023
Currently, if function was created as C stored procedure with box.schema.func.create, all types of router.call and router.map_callrw cannot find it and return `Procedure 'name' is not defined` error. This is cased by the fact that both of these function use local_call, which invokes net_box.self.call, which doesn't currently work with C stored procedures due to the bug. Let's use box.func, where it's possible instead of net_box.self.call in local_call. Closes tarantool#436 NO_DOC=bugfix NO_TEST=<already tested>
Serpentian
added a commit
to Serpentian/vshard
that referenced
this issue
Nov 21, 2023
Currently, if function was created as C stored procedure or as Lua persistent function (with body argument) via box.schema.func.create, all types of router.call and router.map_callrw cannot find it and return `Procedure 'name' is not defined` error. This is cased by the fact that both of these function use local_call, which invokes net_box.self.call, which doesn't currently work with C stored procedures due to the bug. Let's use box.func, where it's possible instead of net_box.self.call in local_call. Closes tarantool#436 NO_DOC=bugfix
Serpentian
added a commit
to Serpentian/vshard
that referenced
this issue
Nov 28, 2023
Currently, if function was created as C stored procedure or as Lua persistent function (with body argument) via box.schema.func.create, all types of router.call and router.map_callrw cannot find it and return `Procedure 'name' is not defined` error. This is cased by the fact that both of these function use local_call, which invokes net_box.self.call. It didn't work with these type of functions before Tarantool 3.0.0-beta1-18. Let's use box.func, where it's needed instead of net_box.self.call in local_call. Closes tarantool#436 NO_DOC=bugfix
Gerold103
pushed a commit
that referenced
this issue
Dec 6, 2023
Currently, if function was created as C stored procedure or as Lua persistent function (with body argument) via box.schema.func.create, all types of router.call and router.map_callrw cannot find it and return `Procedure 'name' is not defined` error. This is cased by the fact that both of these function use local_call, which invokes net_box.self.call. It didn't work with these type of functions before Tarantool 3.0.0-beta1-18. Let's use box.func, where it's needed instead of net_box.self.call in local_call. Closes #436 NO_DOC=bugfix
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
We have a c stored procedure
execute
, earlier we called it via replicaset api like this:Now we've started to use
map_callrw
router api, which gives us an error saying it is not defined:The function was created like this:
And it is callable through box.func api:
Tarantool version: 2.11.0
Vshard version: latest
Hint
After digging a bit in the code I found that
map_callrw(f, args)
callsstorage_map(f, args)
, the latter callsnet.box.self.call(f, args)
and this internally in tarantool callsbox_lua_find
which tries to find the function in lua globals.On the other hand,
replica:callbre(f, args)
callsnet.box.conn.call
, the latter first checks whether the function is in cache and only then usesbox_lua_find
.So the problem seems to be in using
self.call
insidestorage_map
The text was updated successfully, but these errors were encountered: