[SERVER-15841] Option manualAddShard in ShardingTest object is ignored Created: 28/Oct/14  Updated: 10/Dec/14  Resolved: 28/Oct/14

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

Type: Bug Priority: Major - P3
Reporter: Jonathan Abrahams Assignee: Unassigned
Resolution: Done Votes: 0
Labels: 28qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Steps To Reproduce:

Parameter style

st = new ShardingTest("maxSize", 2, 1, 1, {shards: 2, chunksize: 1, manualAddShard: true});
st.printShardingStatus();
st.adminCommand({addshard: st.getConnNames()[0], maxSize: 5});
st.adminCommand({addshard: st.getConnNames()[1], maxSize: 1});

Object style - fails on addshard

st = new ShardingTest({name: "maxSize", shards: 2, chunksize: 1, manualAddShard: true});
st.printShardingStatus();
// Note that shards are added, as option is ignored
st.adminCommand({addshard: st.getConnNames()[0], maxSize: 5});
st.adminCommand({addshard: st.getConnNames()[1], maxSize: 1});

Participants:

 Description   

The ShardingTest object support 2 styles for specifying a test. The object style permits definitions of various options. The manualAddShard option only works when using the parameter style, not the object style.



 Comments   
Comment by Jonathan Abrahams [ 28/Oct/14 ]

This can be accomplished using the other object:

st = new ShardingTest({name: "maxSize", shards: 2, chunksize: 1, other: {manualAddShard: true}});
st.printShardingStatus();
// Note that shards are added, as option is ignored
st.adminCommand({addshard: st.getConnNames()[0], maxSize: 5});
st.adminCommand({addshard: st.getConnNames()[1], maxSize: 1});

Generated at Thu Feb 08 03:39:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.