Skip to content

Hotkeys Adjustmens#3173

Merged
nkaradzhov merged 5 commits intoredis:masterfrom
nkaradzhov:hotkeys
Feb 10, 2026
Merged

Hotkeys Adjustmens#3173
nkaradzhov merged 5 commits intoredis:masterfrom
nkaradzhov:hotkeys

Conversation

@nkaradzhov
Copy link
Collaborator

@nkaradzhov nkaradzhov commented Feb 5, 2026

  • Change time units from ms to us for CPU time fields
  • Add SlotRange interface for slot range representation
  • Update field names (byCpuTime → byCpuTimeUs, etc.)
  • Fix HOTKEYS_STOP to return null in empty state
  • Update response parsing for new array-wrapped format
  • Add test for HOTKEYS_STOP empty state behavior

Checklist

  • Does npm test pass with this change (including linting)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?

- Change time units from ms to us for CPU time fields
- Add SlotRange interface for slot range representation
- Update field names (byCpuTime → byCpuTimeUs, etc.)
- Fix HOTKEYS_STOP to return null in empty state
- Update response parsing for new array-wrapped format
- Add test for HOTKEYS_STOP empty state behavior
- nil -> null
Copy link
Contributor

@PavelPashov PavelPashov left a comment

Choose a reason for hiding this comment

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

LGTM

…l clients

HOTKEYS commands require session affinity (sticky connection to a single
Redis node) which cluster, pool, and sentinel clients cannot guarantee.

Changes:
- Created NON_STICKY_COMMANDS export in commands/index.ts that excludes HOTKEYS commands
- Updated cluster, pool, and sentinel to use NON_STICKY_COMMANDS instead of COMMANDS
- Added tests to verify HOTKEYS commands are not available on these client types
break;
case 'sampled-command-selected-slots-us':
case 'sampled-commands-selected-slots-us':
result.sampledCommandSelectedSlotsUs = Number(value);
Copy link
Contributor

@PavelPashov PavelPashov Feb 10, 2026

Choose a reason for hiding this comment

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

Should we update the field in the response to sampledCommandsSelectedSlotsUs as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

totally, i thought i updated it...

- Fix field name from 'sampled-command-selected-slots-us' to
  'sampled-commands-selected-slots-us' (with 's') to align with
  server changes in the new test image
- Update TypeScript property name from sampledCommandSelectedSlotsUs
  to sampledCommandsSelectedSlotsUs for consistency
- Add comprehensive tests for all HOTKEYS GET response fields
- Add cluster tests for SLOTS and SAMPLE options to verify
  slot-specific and sampled fields are correctly parsed
@nkaradzhov nkaradzhov merged commit e30ab2d into redis:master Feb 10, 2026
15 checks passed
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.

2 participants