Skip to content

Conversation

bsbodden
Copy link
Collaborator

Wrap redis-py's get_protocol_version to catch AttributeError when ClusterPipeline objects lack nodes_manager attribute. Returns None on error, causing NEVER_DECODE to be set (safe fallback behavior).

This fixes crashes when using SearchIndex.load() with Redis Cluster where batch operations create ClusterPipeline objects internally.

Fixes #365

)

  Wrap redis-py's get_protocol_version to catch AttributeError when
  ClusterPipeline objects lack nodes_manager attribute. Returns None
  on error, causing NEVER_DECODE to be set (safe fallback behavior).

  This fixes crashes when using SearchIndex.load() with Redis Cluster
  where batch operations create ClusterPipeline objects internally.

  Fixes #365
@bsbodden bsbodden requested a review from rbs333 September 23, 2025 17:33
Copy link
Collaborator

@rbs333 rbs333 left a comment

Choose a reason for hiding this comment

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

LGTM

@bsbodden bsbodden merged commit b32ed95 into main Sep 23, 2025
35 checks passed
@bsbodden bsbodden deleted the bsb/issue-365 branch September 23, 2025 22:02
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.

AttributeError: 'ClusterPipeline' object has no attribute 'nodes_manager' when using index.load() with Redis Cluster
2 participants