Skip to content

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

Open
AvivDavid23 wants to merge 1 commit into8.2from
cherry-pick-8cf64ec-to-8.2
Open

Cherry-pick: RDB load - return error on failure#1537
AvivDavid23 wants to merge 1 commit into8.2from
cherry-pick-8cf64ec-to-8.2

Conversation

@AvivDavid23
Copy link
Copy Markdown
Contributor

@AvivDavid23 AvivDavid23 commented Apr 7, 2026

Cherry-pick of 8cf64ec2bb83c4365941e768a7ffde5a3134b7e4 onto 8.2.

Propagates RDB load failures instead of swallowing them (backward compatibility / error handling).

Made with Cursor


Note

Medium Risk
Changes RDB loading to return RedisError instead of panicking/unwrapping, which affects module startup/data loading paths; mistakes could reject previously-loadable dumps or change failure behavior.

Overview
Improves failure handling for RedisJSON RDB loads. Legacy RDB parsing now uses TryFrom and returns RedisError for unknown node types instead of panicking, and nested dict parsing propagates these failures.

When loading encoding version 0, JSON serialization and UTF-8 conversion now propagate errors (replacing unwrap()), and unsupported encver values return a descriptive RedisError instead of panicking.

Reviewed by Cursor Bugbot for commit f4d0020. 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 66.66667% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.74%. Comparing base (c9d32b5) to head (f4d0020).
⚠️ Report is 13 commits behind head on 8.2.

Files with missing lines Patch % Lines
redis_json/src/redisjson.rs 33.33% 4 Missing ⚠️
redis_json/src/backward.rs 83.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              8.2    #1537      +/-   ##
==========================================
- Coverage   79.20%   78.74%   -0.46%     
==========================================
  Files          15       14       -1     
  Lines        3707     3547     -160     
==========================================
- Hits         2936     2793     -143     
+ Misses        771      754      -17     

☔ 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