Repository navigation
Conversation
'return_raw' gives the storage's response to the router packed. Its first element is a flag whether the call succeeded. The error comes packed too. lerror.make() can't decode msgpack, so the error lost its code, and the router could not see that it was retriable. The failed request was returned to the user instead of being rerouted to the new bucket location. Unpack the error, but keep the rest of the response packed. A nil flag is packed as null and comes back as box.NULL, which is truthy. Treat it as a failure too, otherwise the error was returned as a regular value. Closes tarantool#682 NO_DOC=bugfix
The synchronous call cut the storage's status flag out of the raw response, but the asynchronous one did not. It went through the usual branch, which decodes the values, so 'return_raw' had no effect with 'is_async'. Cut the flag in the future wrapper as well, and return the rest as is, the same way as the synchronous call and netbox do. Now the synchronous call also returns an empty object for an empty response instead of nil, to keep both paths identical and to match netbox. Closes tarantool#592 NO_DOC=bugfix
Serpentian
self-requested a review
November 30, 2026 10:40
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.
Why
return_rawis broken in two ways.With
is_asyncit does nothing: the future wrapper decodes the values, so theuser gets a table instead of a msgpack object.
The retry is also broken. The storage's error comes packed,
lerror.make()cannot decode msgpack, so
err.codeis lost and the router returns the errorinstead of rerouting the request to the new bucket location.
What
Cut the status flag in the future wrapper too, and unpack the error for
lerror.make(). The rest of the response stays packed.The synchronous call now returns an empty object for an empty response instead
of
nil, so both paths match netbox.Two commits: the retry fix first, then the shared helper plus the async path.
The reverse order is impossible — the helper alone already fixes the retry.
Validation
test_return_raw_async,test_return_raw_nil_status, andtest_retryable_transfer_in_progress_rawintest/router-luatest/router_2_2_test.lua.All 29 tests of the file pass.
Closes #592
Closes #682