Skip to content

Conversation

@JHSeo-git
Copy link
Contributor

Fixes #116

Problem

This pull request fixes an AttributeError raised when using AsyncRedisSaver and calling aget_state_history().

Solution

The fix aligns the async implementation with the existing sync version.

Result

aget_state_history() and related async checkpoint operations now work reliably without raising attribute errors

Thank you for maintaining this great project!
I’ve mirrored the sync version’s logic and verified that the async implementation now behaves consistently.

Modified the AsyncRedisSaver to access the blob attribute using JSON path syntax. Enhanced the sorting mechanism for parent checkpoints and ensured the results map correctly extracts type and blob pairs, accommodating both direct and JSON path access. This improves compatibility and consistency in data handling.
@bsbodden bsbodden self-requested a review November 14, 2025 14:40
@bsbodden bsbodden self-assigned this Nov 14, 2025
Copy link
Contributor

@bsbodden bsbodden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you for the contribution!

@bsbodden bsbodden merged commit fe48e7f into redis-developer:main Nov 14, 2025
21 checks passed
bsbodden added a commit that referenced this pull request Nov 14, 2025
Adds comprehensive regression tests for Issue #116 where AsyncRedisSaver
would raise AttributeError when accessing blob attributes in _abatch_load_pending_sends.

Tests verify:
- Correct handling of $.blob JSON path attribute syntax
- Graceful fallback when blob attributes are missing
- Proper mocking of Redis Document responses

These tests would have caught the bug fixed in PR #117.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
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.

AsyncRedisSaver: AttributeError: 'Document' object has no attribute 'blob' when calling aget_state_history()

2 participants