Skip to content

Deprecate remaining Server, Cluster, Client, and Connection Commands - #3847

Open
juntae6942 wants to merge 6 commits into
redis:mainfrom
juntae6942:feature/3796-deprecate-remaining-commands
Open

Deprecate remaining Server, Cluster, Client, and Connection Commands#3847
juntae6942 wants to merge 6 commits into
redis:mainfrom
juntae6942:feature/3796-deprecate-remaining-commands

Conversation

@juntae6942

@juntae6942 juntae6942 commented Jul 16, 2026

Copy link
Copy Markdown

Closes #3796
This PR addresses the remaining deprecations for Server, Cluster, Client, and Connection commands as outlined in #3796.

Changes included:

  • Java APIs (Sync/Async/Reactive, Sentinel, Node-selection): Added @Deprecated annotations and @deprecated Javadoc tags (pointing to their respective replacements since 7.7) for the following commands:
    • QUIT (Use StatefulConnection.close() instead)
    • SLAVEOF (Use REPLICAOF instead)
    • CLUSTER SLAVES (Use CLUSTER REPLICAS instead)
    • CLUSTER SLOTS (Use CLUSTER SHARDS instead)
    • Legacy CLIENT KILL <addr> (Use clientKill(KillArgs) instead)
  • Protocol Enums: Updated CommandType and CommandKeyword to reflect the deprecations.

Note

Low Risk
Documentation-only API deprecations; existing call sites keep working until removal in a future release.

Overview
Marks several legacy Lettuce APIs as deprecated since 7.7 across sync, async, reactive, Kotlin coroutines, cluster node-selection, and Sentinel command interfaces—no runtime or wire-protocol behavior changes.

Connection: quit() is deprecated in favor of StatefulConnection.close() (including cluster BaseNodeSelectionCommands).

Client: clientKill(String addr) is deprecated in favor of clientKill(KillArgs) on server and Sentinel APIs.

Cluster: clusterSlots() is deprecated in favor of clusterShards() on cluster sync/async/reactive interfaces.

Kotlin quit() uses @Deprecated("Use StatefulConnection.close() instead."). CommandKeyword enum constants are regrouped on two lines (formatting only). BaseRedisCommands gains an @author line.

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

@a-TODO-rov a-TODO-rov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

General approach we use is:

  • Edit templates
  • Run generators (pay attention to Constants class, generators are not idempotent ...)
  • Check created changes and fix manually if needed, so only the relevant ones remain.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Generally, no need to deprecate those.

* @deprecated since 7.7, use {@link #SHARDS} instead.
*/
@Deprecated
SLOTS,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is honestly wrong. Multiple usages.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We generally dont depraecate those.

@juntae6942

Copy link
Copy Markdown
Author

Hi @a-TODO-rov, thanks for the detailed guidance!

I've updated the PR based on your feedback:

  1. Reverted the @Deprecated annotations from the protocol enums (CommandType and CommandKeyword).
  2. Followed the generator workflow: I added the deprecations to the templates, ran the generators, and then manually reverted the unintended changes (like Constants.java and RediSearch*Commands.java) so that only the relevant API interfaces are updated.

Could you please take another look? Let me know if there's anything else I need to fix!

@juntae6942
juntae6942 requested a review from a-TODO-rov July 18, 2026 01:35
@juntae6942
juntae6942 force-pushed the feature/3796-deprecate-remaining-commands branch from 0c1704c to f0d3dd1 Compare August 9, 2026 23:56
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.

Deprecate Remaining Server, Cluster, Client, and Connection Commands

2 participants