Skip to content

Added support for HOTKEYS commands - #1408

Merged
vladvildanov merged 2 commits into
masterfrom
vv-hotkeys-commands
Nov 5, 2026
Merged

vladvildanov merged 2 commits into
masterfrom
vv-hotkeys-commands

Conversation

@vladvildanov

@vladvildanov vladvildanov commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Note

Low Risk
New optional server-admin APIs on single-node clients only, with explicit failures on cluster/distributed and tests; no changes to data commands or auth.

Overview
Adds client support for Redis 8.6 HOTKEYS so a single-node Redis client can start a tracking session, read ranked hot keys by CPU and/or network bytes, stop, and reset.

On standalone clients, hotkeys_start, hotkeys_get, hotkeys_stop, and hotkeys_reset build the wire command (metrics, count, duration, sample, optional slots) and HashifyHotkeys normalizes hotkeys_get replies across RESP2/RESP3, including [key, value] pairs for the by-* fields.

Redis::Cluster and Redis::Distributed override all four methods to raise NotImplementedError with guidance to connect to one node directly, because tracking is server-wide and not routable. The cluster driver wraps pipelined / multi blocks with HotkeysGuard so HOTKEYS cannot slip through to an arbitrary shard.

README documents usage and limitations; integration tests cover the happy path, error cases, argument encoding, pipelined hotkeys_get, and cluster/distributed rejection.

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 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-11-04T14:04:45.871169Z 8b2bbdc PR opened
ℹ️ 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.

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8838e20. Configure here.

Comment thread cluster/lib/redis/cluster/client.rb Resolved
@vladvildanov
vladvildanov merged commit d11eebf into master Nov 5, 2026
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant