Skip to content

RUBY-3783 Test deprioritized selection with tag sets#3017

Merged
comandeo-mongo merged 1 commit intomongodb:masterfrom
comandeo-mongo:3783
Apr 13, 2026
Merged

RUBY-3783 Test deprioritized selection with tag sets#3017
comandeo-mongo merged 1 commit intomongodb:masterfrom
comandeo-mongo:3783

Conversation

@comandeo-mongo
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 13, 2026 13:53
@comandeo-mongo comandeo-mongo requested a review from a team as a code owner April 13, 2026 13:53
@comandeo-mongo comandeo-mongo requested a review from jamis April 13, 2026 13:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds server selection spec test fixtures to validate behavior when a deprioritized server is the only one matching the configured tag sets, covering both replica set topologies with and without a primary. This helps ensure correct selection/fallback behavior across read preference modes when tag set filtering interacts with deprioritization.

Changes:

  • Added new YAML fixtures for ReplicaSetWithPrimary covering Secondary, SecondaryPreferred, PrimaryPreferred, and Nearest when only a deprioritized server matches tag sets.
  • Added matching YAML fixtures for ReplicaSetNoPrimary for the same read preference modes.
  • Included regression coverage notes for CDRIVER-6248 in applicable cases.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
spec/spec_tests/data/server_selection/ReplicaSetWithPrimary/read/DeprioritizedSecondaryPreferredOnlyMatchingTags.yml Tests SecondaryPreferred behavior with tag sets when only the deprioritized server matches.
spec/spec_tests/data/server_selection/ReplicaSetWithPrimary/read/DeprioritizedSecondaryOnlyMatchingTags.yml Tests Secondary behavior with tag sets when only the deprioritized server matches.
spec/spec_tests/data/server_selection/ReplicaSetWithPrimary/read/DeprioritizedPrimaryPreferredOnlyMatchingTags.yml Tests PrimaryPreferred behavior with tag sets when only the deprioritized server matches.
spec/spec_tests/data/server_selection/ReplicaSetWithPrimary/read/DeprioritizedNearestOnlyMatchingTags.yml Tests Nearest behavior with tag sets when only the deprioritized server matches.
spec/spec_tests/data/server_selection/ReplicaSetNoPrimary/read/DeprioritizedSecondaryPreferredOnlyMatchingTags.yml Tests SecondaryPreferred in no-primary topology when only the deprioritized server matches.
spec/spec_tests/data/server_selection/ReplicaSetNoPrimary/read/DeprioritizedSecondaryOnlyMatchingTags.yml Tests Secondary in no-primary topology when only the deprioritized server matches.
spec/spec_tests/data/server_selection/ReplicaSetNoPrimary/read/DeprioritizedPrimaryPreferredOnlyMatchingTags.yml Tests PrimaryPreferred in no-primary topology when only the deprioritized server matches.
spec/spec_tests/data/server_selection/ReplicaSetNoPrimary/read/DeprioritizedNearestOnlyMatchingTags.yml Tests Nearest in no-primary topology when only the deprioritized server matches.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@comandeo-mongo comandeo-mongo changed the title RUBY-3784 Test deprioritized selection with tag sets RUBY-3783 Test deprioritized selection with tag sets Apr 13, 2026
@comandeo-mongo comandeo-mongo merged commit 349d211 into mongodb:master Apr 13, 2026
206 of 208 checks passed
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.

3 participants