[automatic failover] Make MultiDbConfig.DatabaseConfig.Builder agnostic to call order#4456
Merged
atakavci merged 5 commits intoredis:masterfrom Mar 11, 2026
Merged
Conversation
ggivo
previously approved these changes
Mar 5, 2026
ggivo
reviewed
Mar 5, 2026
Collaborator
There was a problem hiding this comment.
LGTM,
need to adress failing tests
ggivo
approved these changes
Mar 9, 2026
Collaborator
There was a problem hiding this comment.
LGTM,
Note: As discussed offline, removing a construcor is a breakign change but, sicne this is still experimental feature we are not marking it as such
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When configuring A-A failover, the order in which
healthCheckEnabledandhealthCheckStrategywere called affected the outcome —healthCheckEnabled(false)had no effect if set first.Fixed by ensuring
healthCheckEnabledalways takes explicit priority regardless of call order.Note
Medium Risk
Touches health-check enablement logic used by automatic failover/failback; misconfiguration could change whether background health checks run or which strategy is used.
Overview
Makes
MultiDbConfig.DatabaseConfig.Buildercall-order agnostic for health checks. A newhealthCheckEnabledflag (defaulttrue) now gatesgetHealthCheckStrategySupplier()(returnsnullwhen disabled), whilehealthCheckStrategySupplierconsistently defaults toPingStrategy.DEFAULTand is no longer nulled out byhealthCheckEnabled(false).Removes the
DatabaseConfigconstructor overload that accepted a pool config (tests now build configs via the builder), and updates integration tests to explicitly disable health checks using the builder where needed (e.g.,AutomaticFailoverTest).Written by Cursor Bugbot for commit 915421b. This will update automatically on new commits. Configure here.