Wiring new methods to old methods#3743
Conversation
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ 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 2147c44. Configure here.
| return Mono.fromCompletionStage(future).doOnError(t -> logger.warn(t.getMessage())); | ||
| } | ||
|
|
||
| @SuppressWarnings("unchecked") |
There was a problem hiding this comment.
Dead private connect methods after refactoring to connectFuture
Low Severity
The two private connect methods returning Mono<T> (one taking StatefulRedisClusterConnectionImpl, the other taking StatefulRedisConnectionImpl) are now unused dead code. All call sites that previously used these methods have been replaced with calls to the new connectFuture methods. A grep confirms no remaining callers exist within this class.
Reviewed by Cursor Bugbot for commit 2147c44. Configure here.
| logger.debug("RebindAwareAddressSupplier using rebind address: {}", current); | ||
| logger.debug("RebindAwareAddressSupplier rebind address: {}", current.rebindAddress); | ||
| return CompletableFuture.completedFuture(current.rebindAddress); | ||
| logger.debug("RebindAwareAddressSupplier using rebind address: {}", state.get()); |
There was a problem hiding this comment.
Logging uses state.get() instead of captured current variable
Low Severity
Inside wrappedSupplier, the debug log statements at the top of the Mono.defer lambda use state.get() instead of the already-captured current local variable. In a concurrent environment, state could be updated by another thread between the initial read into current and the subsequent state.get() calls, causing the log to show a different state than what the code is actually acting upon. This makes debugging concurrent rebind issues misleading.
Reviewed by Cursor Bugbot for commit 2147c44. Configure here.


Make sure that:
mvn formatter:formattarget. Don’t submit any formatting related changes.Note
Medium Risk
Touches connection establishment and auto-reconnect address resolution paths (including cluster connect retry logic), so regressions could impact connectivity despite mostly being API wiring/deprecation changes.
Overview
Shifts socket address resolution/connection wiring to prefer
Supplier<CompletionStage<SocketAddress>>throughoutAbstractRedisClient,ConnectionBuilder,RedisClient, andRedisClusterClient, while marking the priorMono-based hooks as@Deprecatedand adding new*Stage/*Asyncaccessors.Updates reconnect watchdogs (
ConnectionWatchdog,MaintenanceAwareConnectionWatchdog) to wrap async suppliers viaMonointernally and exposeswrapSocketAddressSupplierAsync, and rewrites cluster connect retry loops to useCompletableFuturechaining instead of ReactorMonoretry. Unit tests are adjusted to the newMono-basedRebindAwareAddressSupplierAPI.Reviewed by Cursor Bugbot for commit 2147c44. Bugbot is set up for automated code reviews on this repo. Configure here.