tarantool / tarantool/tarantool
Check function arguments in IPROTO
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 3.7k
- Forks
- 419
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 88
Description
IPROTO doesn't check arguments passed to a function executed with IPROTO_CALL. This is supposed to be done by the function implementation, but doing it in the main thread may negatively affect performance. It'd be nice if this job could be offloaded to IPROTO threads, because the number of IPROTO threads is configurable and typically they are less loaded than the transaction processing thread.
Now, that we have box.iproto.export() (#10036), we can pass the arguments schema to it when exporting a function. The schema could be "compiled" and passed to IPROTO, where function arguments would be checked against it. We could also verify the return value and raised errors in the "debug" mode.
See also #11760.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing box.iproto.export() behavior from #10036 and the IPROTO_CALL path described here, then compare the related discussion in #11760. Define how an exported function's argument schema reaches IPROTO threads and how validation, including optional debug-mode return and error checks, should be verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- backend-api-design, database, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100