[SERVER-53470] Create a ShardingTest guide Created: 21/Dec/20  Updated: 29/Oct/23  Resolved: 11/Oct/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.2.0

Type: Improvement Priority: Major - P3
Reporter: Ted Tuckman Assignee: Jason Zhang
Resolution: Fixed Votes: 1
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Sharding 2021-07-12, Sharding 2021-07-26, Sharding 2021-08-09, Sharding 2021-08-23, Sharding 2021-10-04, Sharding 2021-10-18
Participants:

 Description   

It would be useful to have easily accessible documentation for ShardingTest enumerating the ways to manipulate the state of the cluster.



 Comments   
Comment by Githook User [ 07/Oct/21 ]

Author:

{'name': 'Jason Zhang', 'email': 'jason.zhang@mongodb.com', 'username': 'jz1242'}

Message: SERVER-53470 Create a ShardingTest guide
Branch: master
https://github.com/mongodb/mongo/commit/b02ad59279a57b6689dd16602a464d91570b0710

Comment by Max Hirschhorn [ 15/Jan/21 ]

We discussed this ticket in the sharding team triage. There's interest in having the doc comment for ShardingTest give a couple of working examples for its constructor:

  • How to use {rs: {nodes: ...}} to add secondaries to the replica set shards.
  • How to use {{{rsOptions: {setParameter: { ... }}}}} to start all mongod shards with a particular server parameter.

It would also be good to describe the topology that new ShardingTest() (without any arguments) starts by default.

Additionally, there's interest in having the doc comment for ShardingTest describe how to access connections through different mongos processes with st.s, st.s1, etc., through shards with st.shard0, st.shard1, etc. as replica set connections, and through shards with st.shard0.rs.nodes[1] as direct connections.

Generated at Thu Feb 08 05:31:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.