Skip to content

Cherry-pick: RDB load - return error on failure#1539

Open
AvivDavid23 wants to merge 1 commit into8.0from
cherry-pick-8cf64ec-to-8.0
Open

Cherry-pick: RDB load - return error on failure#1539
AvivDavid23 wants to merge 1 commit into8.0from
cherry-pick-8cf64ec-to-8.0

Conversation

@AvivDavid23
Copy link
Copy Markdown
Contributor

@AvivDavid23 AvivDavid23 commented Apr 7, 2026

Cherry-pick of 8cf64ec2bb83c4365941e768a7ffde5a3134b7e4 onto 8.0.

Propagates RDB load failures instead of swallowing them.

Made with Cursor


Note

Medium Risk
Changes the RDB deserialization path to return Errors (including unknown node types/encoding versions and JSON/UTF-8 serialization failures) instead of panicking, which could affect module loading behavior for malformed or unexpected persisted data.

Overview
Improves RedisJSON RDB backward-loading to fail gracefully rather than panic.

backward::json_rdb_load now uses TryFrom<u64> for NodeType and returns an Error on unknown node type values, and value_rdb_load_json propagates JSON serialization/UTF-8 errors and returns an Error for unsupported encver instead of panicking.

Reviewed by Cursor Bugbot for commit be0d055. Bugbot is set up for automated code reviews on this repo. Configure here.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 7, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.99%. Comparing base (5a44d47) to head (be0d055).
⚠️ Report is 13 commits behind head on 8.0.

Files with missing lines Patch % Lines
redis_json/src/backward.rs 83.33% 2 Missing ⚠️
redis_json/src/redisjson.rs 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              8.0    #1539      +/-   ##
==========================================
- Coverage   79.24%   78.99%   -0.25%     
==========================================
  Files          15       15              
  Lines        3729     3747      +18     
==========================================
+ Hits         2955     2960       +5     
- Misses        774      787      +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant