[DRIVERS-2609] Deprecate sharded-replicaset topology type and clean up redundant runOnRequirements Created: 20/Apr/23  Updated: 21/Aug/23

Status: Implementing
Project: Drivers
Component/s: Change Streams, CSOT, Retryability, Sessions, Stable API, Transactions, Unified Test Runner
Fix Version/s: None

Type: Task Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Jeremy Mikola
Resolution: Unresolved Votes: 0
Labels: leads-triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split to CDRIVER-4639 Deprecate sharded-replicaset topology... Backlog
split to CSHARP-4649 Deprecate sharded-replicaset topology... Backlog
split to GODRIVER-2838 Deprecate sharded-replicaset topology... Backlog
split to PYTHON-3712 Deprecate sharded-replicaset topology... Backlog
split to CXX-2690 Deprecate sharded-replicaset topology... Closed
split to JAVA-4961 Deprecate sharded-replicaset topology... Closed
split to MOTOR-1132 Deprecate sharded-replicaset topology... Closed
split to PHPLIB-1132 Sync unified spec tests for revised r... Closed
split to RUBY-3254 Deprecate sharded-replicaset topology... Closed
split to RUST-1649 Deprecate sharded-replicaset topology... Closed
split to NODE-5276 Deprecate sharded-replicaset topology... Scheduled
Related
related to DRIVERS-2610 Note that load-balanced topologies ar... Closed
related to DRIVERS-2675 Remove use of "sharded-replicaset" in... Closed
related to PHPLIB-1202 Assume sharded clusters use replica s... Closed
related to PHPLIB-464 isShardedClusterUsingReplicasets() sh... Closed
Driver Changes: Needed
Downstream Changes Summary:

Sync spec tests to mongodb/specifications@474ddfc for the following directories:

  • change-streams/tests/unified
  • client-side-operations-timeout/tests
  • retryable-writes/tests/unified
  • sessions/tests
  • transactions/tests/unified
  • unified-test-format/tests/valid-pass
  • versioned-api/tests

No test runner changes should be required.

Engineering Lead: Andreas Braun Andreas Braun
Start date:
Driver Compliance:
Key Status/Resolution FixVersion
CDRIVER-4639 Backlog
CXX-2690 Fixed 3.8.0
CSHARP-4649 Backlog
GODRIVER-2838 Backlog
JAVA-4961 Won't Fix
NODE-5276 Scheduled
MOTOR-1132 Duplicate
PYTHON-3712 Backlog
PHPLIB-1132 Fixed 1.16.0
RUBY-3254 Fixed 2.19.0
RUST-1649 Fixed 2.6.0

 Description   

Summary

I came across some redundant runOnRequirement definitions in various spec tests while reviewing mongodb/specifications#1389 for DRIVERS-2577. For instance, some specs include both "sharded-replicaset" and "sharded" in the same topologies array.

MongoDB 3.6+ requires that all shards be replica sets (see: Shard Replica Sets from the MongoDB 3.6 release notes). With that in mind, the "sharded-replicaset" topology is not useful for runOnRequirements that specify a minServerVersion of 3.6+.

Historically, I cannot recall a case where a test incorrectly used "sharded" instead of "sharded-replicaset". This would only have been an issue for testing on pre-3.6 servers, but most of the features that require replica sets already require 3.6+ (e.g. change streams, transactions). Additionally, the mongo-orchestration configs in drivers-evergreen-tools have historically used replica sets for shards.

The Unified Test Format spec format would do well to deprecate "sharded-replicaset" and encourage tests to use "sharded" in its place (when targeting 3.6+ servers).

Motivation

Who is the affected end user?

Driver developers.

How does this affect the end user?

Using "sharded-replicaset" adds unnecessary overhead. Additionally, redundant runOnRequirements make tests files more verbose.

Is this issue urgent?

No.

Is this ticket required by a downstream team?

No.

Is this ticket only for tests?

Yes.



 Comments   
Comment by Githook User [ 25/May/23 ]

Author:

{'name': 'Dmitry Rybakov', 'email': 'dmitry.rybakov@mongodb.com', 'username': 'comandeo'}

Message: POC for DRIVERS-2609 (#2714)
Branch: master
https://github.com/mongodb/mongo-ruby-driver/commit/0feee3ab4dbebd6bffa9924259e71d3ccb299a67

Comment by Githook User [ 12/May/23 ]

Author:

{'name': 'Jeremy Mikola', 'email': 'jmikola@gmail.com', 'username': 'jmikola'}

Message: DRIVERS-2609: Deprecate sharded-replicaset topology type and clean up redundant runOnRequirements (#1408)

  • DRIVERS-2609: Deprecate "sharded-replicaset" topology type in runOnRequirements

MongoDB 3.6+ requires all shards to be replica sets, so there is no reason use "sharded-replicaset" instead of "sharded".

The "sharded-replicaset" topology type dates back to the first version of the Unified Test Format, but it's not clear it was ever truly necessary. It appears to have only been used in conjunction with 3.6+ minServerVersion requirements.

  • Remove redundant usage of "sharded-replicaset" in runOnRequirements
  • Remove redundant runOnRequirements in CSOT tests

A replica set will already be matched by the first runOnRequirement.

  • Update link to config.shards docs page in Unified Test Format spec
Comment by Jeremy Mikola [ 20/Apr/23 ]

PR: https://github.com/mongodb/specifications/pull/1408

Generated at Thu Feb 08 08:26:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.