Repository navigation
Conversation
mattsta
pushed a commit
to mattsta/redis
that referenced
this pull request
Aug 2, 2014
Cleans up the flow of code to read much easier too. Closes redis#1615
Closed
mattsta
pushed a commit
to mattsta/redis
that referenced
this pull request
Aug 6, 2014
Cleans up the flow of code to read much easier too. Closes redis#1615
Contributor
|
Denied because "adds a new call in the likely code path in order to remove two calls in the unlikely (error) code path. The added call, lua_insert, needs to shift elements in the stack, so it performs a (short in this case) for loop. To accept such a patch a profiling activity should be done in order to ensure no speed regression: not worth it IMHO." |
Contributor
Author
|
ok, thanks |
YaacovHazan
pushed a commit
that referenced
this pull request
Jul 16, 2026
## Changelog ### RedisJSON [v8.9.81...v8.9.90](RedisJSON/RedisJSON@v8.9.81...v8.9.90) - MOD-16300 perf(json_path): materialize filter literals once per query ([#1615](RedisJSON/RedisJSON#1615)) - MOD-16608 Bump ijson (reduce object memory) ([#1617](RedisJSON/RedisJSON#1617)) - MOD-16274 | MOD-16275 add size/sizeof and empty operators on object ([#1618](RedisJSON/RedisJSON#1618)) - MOD-16685 Add RedisJSON API to open from RedisModuleKey ([#1619](https://github.com/RedisJSON/RedisJSON/pull/1619)/[#1620](https://github.com/RedisJSON/RedisJSON/pull/1620)) ### RedisBloom [v8.9.81...v8.9.90](RedisBloom/RedisBloom@v8.9.81...v8.9.90) - No functional changes — version bump only ([#1033](RedisBloom/RedisBloom#1033))
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.
I believe this change improves scripting.c evalGenericCommand readability.
Instead of pushing the error handler before the function lookup (that needs to clean the stack if it fails), we can get the error handler just before the pcall, using lua_insert to move the error handler function to the proper position in the stack.
Besides avoiding the lua_pop when lookup fails, I believe it's easier to understand why the error handler is now being pushed into the stack, since it is closer to pcall function call and it also explains the -2 pcall argument naturally.