Skip to content

Added CLIENT LIST iterator alternative - #4327

Open
vladvildanov wants to merge 3 commits into
masterfrom
vv-4326-fix
Open

vladvildanov wants to merge 3 commits into
masterfrom
vv-4326-fix

Conversation

@vladvildanov

@vladvildanov vladvildanov commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Description of change

Closes #4326

Pull Request check-list

Please make sure to review and check all of these items:

  • Do tests and lints pass with this change?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.


Note

Low Risk
Additive API with unchanged default client_list() behavior; cluster pipeline blocking mirrors existing CLIENT LIST restrictions.

Overview
Adds client_list_iter(), a streaming alternative to client_list() that yields one parsed client record at a time instead of building a full list[dict]. Callers with very large connection counts can process results without holding every parsed record in memory at once (the full wire reply is still read before iteration).

The response parser gains an as_iter=True path via _client_list_iter, which scans newline boundaries lazily and avoids splitlines() so line lists are not retained for the generator lifetime. Sync and async clients expose the same TYPE / ID filters as client_list().

client_list_iter is explicitly blocked on cluster pipelines (sync and async), matching CLIENT LIST behavior so it cannot be queued as a normal pipelined command.

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

@vladvildanov vladvildanov added the feature New feature label Sep 14, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-14T12:51:32.644409Z 2c889e2 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8da3ab024f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread redis/_parsers/helpers.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 887c6f29ba

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread redis/_parsers/helpers.py
Comment thread redis/commands/core.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLIENT LIST on a connection with many thousands of clients causes a large, avoidable memory spike

1 participant