Drop net.box.self.call() usage on storage #641
Draft
Serpentian wants to merge 2 commits into
Draft
Conversation
In Tarantool versions prior to 3.0.0-beta1-18, `net_box.self.call()` cannot invoke C stored or Lua persistent functions. Therefore, if such a function is registered in `box.func`, vshard executes it via `func.call` instead. If such a function raises an error during an uncommitted transaction, 'Transaction is active...' error is going to be raised, which will mask the original error. This patch fixes that bug by checking the function call result. If the function returns an error and a transaction is still active, vshard now explicitly rolls back the transaction. Fixes tarantool#614 NO_DOC=bugfix
NO_DOC=refactoring NO_TEST=refactoring
2bc5aba to
5ffabbc
Compare
olegrok
reviewed
Feb 7, 2026
Comment on lines
+287
to
+289
| return handle_results(pcall(func, obj, unpack(args))) | ||
| else | ||
| return handle_results(pcall(func, unpack(args))) |
Contributor
There was a problem hiding this comment.
tarantool> unpack({1, nil, 3})
---
- 1
Suggested change
| return handle_results(pcall(func, obj, unpack(args))) | |
| else | |
| return handle_results(pcall(func, unpack(args))) | |
| return handle_results(pcall(func, obj, unpack(args, 1, table.maxn(args)))) | |
| else | |
| return handle_results(pcall(func, unpack(args, 1, table.maxn(args)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This code breaks backward compatibility of
vshard.storage.call, but who cares, if it gives 10% perf boost. Let's check that...