Repository navigation
[reactor-optional] Prepare public APIs for optional Reactor support - #3915
Conversation
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d976320a1d
ℹ️ 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".
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ 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 d976320. Configure here.
d976320 to
4adcd02
Compare

Summary
Prepare Lettuce 7.8 for optional Reactor support by introducing Reactor-independent command access, event subscriptions, and asynchronous trace-context resolution. Existing Reactor-based entry points remain source-compatible but are deprecated for removal in Lettuce 8.0.
Key Decisions & Assumptions
connection.commands(factory)accessors across standalone, cluster, Pub/Sub, Sentinel, master/replica, multi-database, and pooled connections. Default interface methods preserve compatibility with third-party connection implementations.Behavioral / Conceptual Changes
factory()methods;connection.reactive()is deprecated in favor ofconnection.commands(...).EventBus.subscribe(...)returns a closeableSubscription;EventBus.get()is deprecated.AbstractRedisReactiveCommands.ReactorTraceContext, and tracing implementations can resolve context from asynchronous carriers.Testing
Adds unit coverage for factory singleton behavior, command caching, connection variants, and EventBus subscriptions, plus integration coverage for pooled connections and asynchronous/reactive tracing. Verified with formatting and 116 focused Javadoc, Kotlin, aggregate-interface, and sync/reactive consistency tests.
Notes
No deprecated API is removed in 7.8; removals are scheduled for Lettuce 8.0.
Note
Medium Risk
Broad public API surface (connections, EventBus, tracing) with deprecations but backward-compatible defaults; tracing context resolution changes could affect distributed tracing in reactive/async paths.
Overview
Prepares Lettuce 7.8 for optional Project Reactor by adding Reactor-free entry points while keeping existing APIs working until 8.0.
Command APIs: Connections gain cached
commands(CommandsFactory)(backed by a per-connectionStoreand staticfactory()helpers on reactive command interfaces).connection.reactive()is deprecated in favor ofconnection.commands(RedisReactiveCommands.factory())across standalone, cluster, Pub/Sub, Sentinel, multi-DB failover, master/replica wrappers, and pooled proxies.Events:
EventBusadds callbacksubscribe(Consumer)/subscribe(Class, Consumer)returning a closeableSubscription;EventBus.get()(Flux<Event>) is deprecated, with docs updated (including failover examples).Tracing: Reactive command tracing reads context via
ReactorTraceContextandTraceContextProvider.getTraceContextAsync(Map)(Brave/Micrometer updated); olderTracing.*Reactor context helpers are deprecated.Reviewed by Cursor Bugbot for commit 4adcd02. Bugbot is set up for automated code reviews on this repo. Configure here.