Skip to content

Wire old methods to new methods#3742

Closed
a-TODO-rov wants to merge 9 commits into
feature/reactor-optional-1from
wire-connection-plumbing
Closed

Wire old methods to new methods#3742
a-TODO-rov wants to merge 9 commits into
feature/reactor-optional-1from
wire-connection-plumbing

Conversation

@a-TODO-rov
Copy link
Copy Markdown
Contributor

@a-TODO-rov a-TODO-rov commented May 11, 2026

Make sure that:

  • You have read the contribution guidelines.
  • You have created a feature request first to discuss your contribution intent. Please reference the feature request ticket number in the pull request.
  • You applied code formatting rules using the mvn formatter:format target. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.

Note

Medium Risk
Touches connection establishment and reconnect address resolution paths (standalone, cluster, and watchdog), so regressions could affect connectivity/retry behavior despite mostly being adapter/rewiring changes.

Overview
Refactors socket address resolution and connection wiring to prefer Supplier<CompletionStage<SocketAddress>> APIs, as part of making Reactor optional.

Introduces new stage-based hooks (getSocketAddressStage, getSocketAddressSupplierStage, wrapSocketAddressSupplierStage) and wires existing Mono-returning methods to these as @Deprecated compatibility adapters.

Updates cluster connection retry loops to use CompletableFuture chaining instead of Mono (connectFuture helpers), and adjusts MaintenanceAwareConnectionWatchdog to override the renamed stage-based wrapper.

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

@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented May 11, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

Comment thread src/main/java/io/lettuce/core/cluster/RedisClusterClient.java Outdated
Comment thread src/main/java/io/lettuce/core/protocol/ConnectionWatchdog.java Outdated
Copy link
Copy Markdown

@cursor cursor Bot left a comment

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 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 a953f99. Configure here.

return Mono.fromCompletionStage(future).doOnError(t -> logger.warn(t.getMessage()));
}

@SuppressWarnings("unchecked")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Private connect methods now have no callers

Low Severity

The two private connect methods returning Mono<T> (one taking StatefulRedisClusterConnectionImpl and one taking StatefulRedisConnectionImpl) now have zero callers. This PR replaced all call sites with the new connectFuture methods, leaving these as dead code that adds confusion about which method should be used.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit a953f99. Configure here.

@a-TODO-rov a-TODO-rov closed this May 26, 2026
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.

1 participant