Repository navigation
MOD-16685 Add RedisJSON API to open from RedisModuleKey (#1619) - #1655
Merged
AvivDavid23 merged 3 commits intoSep 29, 2026
Merged
Conversation
* MOD-16685 Add RedisJSON API to open from RedisModuleKey Add a RedisJSON shared API V8 entry that opens a JSON root from an already-open RedisModuleKey handle. This lets consumers such as RediSearch reuse an existing key handle instead of manually checking isJSON and calling RedisModule_ModuleTypeGetValue. Update the RediSearch RedisJSON API header copy and add LLAPI coverage for the new openKeyFromHandle path. * use Imanager to get value for json * fix clippy * rename functions * fix compilation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 8.8 #1655 +/- ##
==========================================
- Coverage 75.65% 75.15% -0.50%
==========================================
Files 15 15
Lines 4227 4255 +28
==========================================
Hits 3198 3198
- Misses 1029 1057 +28 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
AvivDavid23
deleted the
8.8-cp-e69a4e6983097e35f98b676266394ab75902764b
branch
September 29, 2026 11:10
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.
Add a RedisJSON shared API V8 entry that opens a JSON root from an already-open RedisModuleKey handle. This lets consumers such as RediSearch reuse an existing key handle instead of manually checking isJSON and calling RedisModule_ModuleTypeGetValue.
Update the RediSearch RedisJSON API header copy and add LLAPI coverage for the new openKeyFromHandle path.
use Imanager to get value for json
fix clippy
rename functions
fix compilation
Note
Medium Risk
Adds a versioned C ABI surface and raw pointer access to module key values; misuse (wrong key type or closed handle) can return null or be unsafe, but behavior mirrors existing open-key paths with explicit validation.
Overview
RedisJSON shared API is bumped to V8 with
getJsonFromHandle, which returns the JSON document root from an already-openRedisModuleKeywithout re-opening the key. Callers (e.g. RediSearch) can reuse a handle they already hold instead of duplicatingisJSONplusRedisModule_ModuleTypeGetValue.The Rust side adds
json_api_get_value_from_handle_internal/JSONAPI_getJsonFromHandle, wires the function into the exportedRedisJSONAPIstruct andrejson_api.h, and extends theManagertrait withget_value_from_handle(implemented for the IValue manager). A unit test asserts a null key handle returns null.The Linux flow workflow drops the always-on Capture test results step; failure uploads of test logs remain unchanged.
Reviewed by Cursor Bugbot for commit b08647d. Bugbot is set up for automated code reviews on this repo. Configure here.