[SERVER-14118] rs.add could detect _id Created: 31/May/14  Updated: 26/Oct/15  Resolved: 25/Jun/14

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

Type: Improvement Priority: Minor - P4
Reporter: David Murphy Assignee: Benety Goh
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to DOCS-3657 rs.add() - _id is now optional in con... Closed
Tested
Participants:

 Description   

When you are using

rs.add({host:"XXXX:YYYY",priority:0,hidden:true})

you must also provide the _id:X however the helper can find the _id based on the previous ones.



 Comments   
Comment by Githook User [ 25/Jun/14 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-14118 removed redundant cfg._id == undefined check from rs.add()
Branch: master
https://github.com/mongodb/mongo/commit/0250c948105ffaa643cf56dba74fe54dab947304

Comment by Githook User [ 25/Jun/14 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-14118 omit _id from rs.add() configuration document in test
Branch: master
https://github.com/mongodb/mongo/commit/c3da6483fcc530b174bc7b50b1aa91d3554e8ade

Comment by Githook User [ 25/Jun/14 ]

Author:

{u'username': u'dbmurphy', u'name': u'David Murphy', u'email': u'david.b.murphy.tx@gmail.com'}

Message: SERVER-14118 Added ability to detect if _id is missing when passing an object to rs.add, if missing add it automatically as if it was a string that had been passed.

Signed-off-by: Benety Goh <benety@mongodb.com>
Branch: master
https://github.com/mongodb/mongo/commit/2e68421c8f524fb5b4c983e9042e56a828a77e84

Comment by Githook User [ 18/Jun/14 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-14118 modify replset JS test to provide rs.add() coverage
Branch: master
https://github.com/mongodb/mongo/commit/aee6fcc2358819d13a89fc05793306037f092dcf

Comment by David Murphy [ 15/Jun/14 ]

Updates have been made in the pull request to add a new test type ( we are not checking this behavior (document based rs.add) currently)

Comment by David Murphy [ 03/Jun/14 ]

https://github.com/mongodb/mongo/pull/688

Pull Request made

Comment by Asya Kamsky [ 31/May/14 ]

Could you clarify what you are referring to?

There is no addShard helper in the replica set. Do you mean sh.addShard? Or rs.add? Or are you suggesting a new helper function?

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