feat: try every address a contact point resolves to (DRIVER-201) - #1074
Draft
nikagra wants to merge 2 commits into
Draft
feat: try every address a contact point resolves to (DRIVER-201)#1074nikagra wants to merge 2 commits into
nikagra wants to merge 2 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
nikagra
force-pushed
the
s2/07-expand-contact-points
branch
from
September 9, 2026 22:12
650e41c to
aee0480
Compare
nikagra
force-pushed
the
s2/07-expand-contact-points
branch
3 times, most recently
from
September 10, 2026 23:03
5d325b7 to
9dd3b25
Compare
ChannelFactory.resolveAll(SocketAddress) asks the resolver the driver's bootstrap would use for a connect, so a custom AddressResolverGroup installed through NettyOptions.afterBootstrapInitialized is honoured, for every address a name currently maps to. It mirrors Netty's own short-circuits (disabled resolver, unsupported or already-resolved address: the input as is). AddressResolver#resolveAll resolves inline, so the lookup runs on one pinned I/O loop, never on the caller; the hook is asked once. No caller yet: the contact-point expansion follows. Refs: scylladb#890 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A contact point given as a hostname was one connect: whatever address Netty's resolver returned first. A dead first record failed build(), and the fallback re-tried one address per round. When the control connection reaches such a contact point it now resolves the name to all its addresses (ChannelFactory.resolveAll), shuffles them, caps them at advanced.connection.max-candidate-addresses and tries each as its own temporary node labelled hostname/ip:port, so AllNodesFailedException names every address. The node reached is registered under that address. Fixes scylladb#989 Fixes scylladb#1072 Refs: scylladb#890 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
nikagra
force-pushed
the
s2/07-expand-contact-points
branch
from
September 11, 2026 13:32
9dd3b25 to
1f01876
Compare
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.
A contact point given as a hostname was one connection attempt, to whatever address Netty's resolver returned first: a dead first record failed
CqlSession.build()(DRIVER-201), and the reconnection fallback from #1065 re-tried one address per round.ChannelFactory.resolveAll, feat: add resolveAll through Netty's configured resolver (DRIVER-201) #1073), deduplicated, shuffled and capped at the newadvanced.connection.max-candidate-addresses(default 5); each address is tried as its own temporary node namedcluster.example.com/10.0.0.1:9042, ahead of the rest of the plan.AllNodesFailedExceptioncarries one entry per address; TLS and authentication keep seeing the configured name.EndPoints and identified nodes are tried as before. A resolver failure or an unusable answer falls back to today's single connect.resolve()resolved,toString()/nodetag gain/ip, prefix, TLS and auth name unchanged; its pool stops re-resolving the name). That is the labelled form of 4.x: the node reached through a contact-point hostname is registered under that hostname, which can later resolve to another node #1072, documented in the upgrade guide.Verified:
ControlConnectionTest+14 (8 red against the pre-expansion code, 6 pin unchanged paths), fullcoresuite (3995) green on JDK 11, docs build;MockResolverITagainst ScyllaDB 2026.1.9 including the dead-first-record case. Not covered locally: the Cassandra CCM lanes.Stacked on #1073 (
s2/06-resolve-all), which sits onscylla-4.xnow that #1065 has merged.Fixes #356
Fixes #989
Fixes #1072
Refs: #890
🤖 Generated with Claude Code