Skip to content
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

storage: fix local_call not finding C stored procedures #437

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

Serpentian
Copy link
Contributor

@Serpentian Serpentian commented Sep 18, 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

@Serpentian Serpentian force-pushed the gh-436-local-call branch 2 times, most recently from 8e4d403 to f6d7f61 Compare September 18, 2023 10:52
@Serpentian Serpentian marked this pull request as ready for review September 27, 2023 17:55
Copy link
Collaborator

@Gerold103 Gerold103 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch!

vshard/storage/init.lua Show resolved Hide resolved
vshard/storage/init.lua Outdated Show resolved Hide resolved
vshard/storage/init.lua Outdated Show resolved Hide resolved
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
Copy link
Collaborator

@Gerold103 Gerold103 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fixes!

@Gerold103 Gerold103 merged commit 28d1b4e into tarantool:master Dec 6, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

map_callrw can't find c stored procedure
2 participants