Repository navigation
Deprecate sorted set commands - #3913
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a8e540ef88
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| * @deprecated since 7.8, use {@link #zrange(Object, ZRange.ByLex)} instead. This command is deprecated by Redis since | ||
| * version 6.2.0. |
There was a problem hiding this comment.
Qualify replacements with their Redis version requirement
When a client connects to Redis before 6.2, following this replacement advice sends the unified ZRANGE ... BYLEX/BYSCORE/REV syntax that those servers do not support, resulting in a command error. Because Lettuce still targets Redis 2.6+, qualify these recommendations as applying to Redis 6.2 and later and tell users of older servers to retain the legacy methods.
AGENTS.md reference: AGENTS.md:L61-L62
Useful? React with 👍 / 👎.
| * @deprecated Use {@link #zrangebyscore(ValueStreamingChannel, java.lang.Object, Range)}. | ||
| * @deprecated since 6.0 in favor of consuming large results through the {@link org.reactivestreams.Publisher} returned by | ||
| * {@link #zrangebyscore}. | ||
| * @deprecated since 7.8, use {@link #zrange(Object, ZRange.ByScore)} instead. This command is deprecated by Redis since |
There was a problem hiding this comment.
Preserve the original reactive deprecation date
For callers of the reactive streaming-channel overloads, these methods were already documented as deprecated since 6.0, but the replacement text now reports that deprecation began in 7.8. This erases the actual API lifecycle and can lead maintainers or users to calculate an incorrect removal window; retain since 6.0 while updating the recommended replacement.
AGENTS.md reference: AGENTS.md:L157-L158
Useful? React with 👍 / 👎.
| * @deprecated since 7.8, use {@link #zrange(Object, ZRange.ByIndex)} with {@link ZRange.ByIndex#rev()} instead. This | ||
| * command is deprecated by Redis since version 6.2.0. | ||
| */ |
There was a problem hiding this comment.
State the removal schedule in deprecation tags
The new public-API deprecation tags stop after naming the replacement and Redis deprecation version, omitting the repository-required scheduled for removal in a future major release clause. Add that lifecycle statement consistently across these newly deprecated methods so generated API documentation follows the house deprecation contract.
AGENTS.md reference: AGENTS.md:L157-L158
Useful? React with 👍 / 👎.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
e80ea91 to
cba72a8
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cba72a8832
ℹ️ 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".
| * @param max max score. | ||
| * @return List<V> array-reply list of elements in the specified range. | ||
| * @deprecated Use {@link #zrangebylex(java.lang.Object, Range)}. | ||
| * @deprecated since 7.8, use {@link #zrange(Object, ZRange.ByLex)} instead; scheduled for removal in a future major |
There was a problem hiding this comment.
Preserve the original Java deprecation date
This overload was already annotated @Deprecated in the immediate parent, so documenting its deprecation as beginning in 7.8 gives callers an incorrect lifecycle and removal timeline. The same applies to the other previously deprecated non-Range overloads mirrored across the sync, async, and node-selection APIs; retain or determine their original deprecation version while updating the replacement guidance.
Useful? React with 👍 / 👎.
Addresses #3795 and deprecates the following Redis commands:
Note
Low Risk
Deprecation and documentation only—runtime behavior is unchanged—but the broad public API surface will surface compiler warnings for existing callers until they migrate.
Overview
Marks the pre–Redis 6.2 sorted-set range APIs as deprecated across Lettuce’s command surfaces (async/reactive implementations and sorted-set command interfaces), steering callers to the unified
zrange/zrangeWithScoresoverloads that take aZRangeselector (ByIndex,ByScore,ByLex) withrev()andlimit(...)where applicable.Deprecated families include
zrangebylex,zrangebyscore,zrangebyscoreWithScores,zrevrange,zrevrangeWithScores,zrevrangebylex,zrevrangebyscore, andzrevrangebyscoreWithScores, including streaming-channel overloads. SeveralRange/Limitoverloads that were not previously annotated are now@Deprecatedas well.Javadoc on each method is expanded to name the replacement overload and how to map string boundaries to
Range.Boundary; removals are planned in a future major release.docs/new-features.mddocuments the change for 7.8, including that the Kotlin coroutine API should use theZRange-based functions instead of the removed legacy commands.Reviewed by Cursor Bugbot for commit 9fd383b. Bugbot is set up for automated code reviews on this repo. Configure here.