[DOCS-14623] var type missing in bloc code Created: 05/Jul/21  Updated: 30/Oct/23  Resolved: 10/Mar/22

Status: Closed
Project: Documentation
Component/s: Code Examples, manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Improvement Priority: Minor - P4
Reporter: Pierre Depretz Assignee: Sarah Olson
Resolution: Fixed Votes: 0
Labels: docs-onboarding-candidate, quick-fix
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 1 year, 51 weeks, 5 days ago
Epic Link: DOCSP-11701

 Description   

Hi,

there is a procedure to follow in order to setup an RS using keyfile here

I'd like to suggest a modification in the chapter 5 for the command rs.initiate()

 

rs.initiate(
  {
    _id : <replicaSetName>,
    members: [
      { _id : 0, host : "mongo1.example.net:27017" },
      { _id : 1, host : "mongo2.example.net:27017" },
      { _id : 2, host : "mongo3.example.net:27017" }
    ]
  }
)

The value associated with _id field is confusing ('<replicaSetName>').
We cant guess whether its an integer (since the field is called '_id' and the associated value doesn't have quotes) or string type (since the value says 'replicaSetName')

In my opinion, it would be more clear if we have:

rs.initiate(
 {
   _id : "<replicaSetName>",

or:

rs.initiate(
 {
   _id : "myReplSet",

(such as this similar example in the documentation or also here, chapter 3)

 

Regards,

Pierre



 Comments   
Comment by Githook User [ 11/Feb/22 ]

Author:

{'name': 'Sarah Olson', 'email': '98367156+sarah-olson-mongodb@users.noreply.github.com', 'username': 'sarah-olson-mongodb'}

Message: Docs 14623 (#512) (#623)

  • DOCS-14623: Update additional rs.initiate examples

Co-authored-by: Sarah Olson <sarah.olson@Sarahs-MacBook-Pro.local>

Co-authored-by: Sarah Olson <sarah.olson@Sarahs-MacBook-Pro.local>
Branch: v4.0
https://github.com/10gen/docs-mongodb-internal/commit/a5dc709c2abdf698de75e334e1f9b2f2e7144d5a

Comment by Githook User [ 11/Feb/22 ]

Author:

{'name': 'Sarah Olson', 'email': '98367156+sarah-olson-mongodb@users.noreply.github.com', 'username': 'sarah-olson-mongodb'}

Message: Docs 14623 (#512) (#622)

  • DOCS-14623: Update additional rs.initiate examples

Co-authored-by: Sarah Olson <sarah.olson@Sarahs-MacBook-Pro.local>

Co-authored-by: Sarah Olson <sarah.olson@Sarahs-MacBook-Pro.local>
Branch: v4.2
https://github.com/10gen/docs-mongodb-internal/commit/1d24ccf3e5d0d48dddd47f818cb46c73c9c7028b

Comment by Githook User [ 11/Feb/22 ]

Author:

{'name': 'Sarah Olson', 'email': '98367156+sarah-olson-mongodb@users.noreply.github.com', 'username': 'sarah-olson-mongodb'}

Message: Docs 14623 (#512) (#621)

  • DOCS-14623: Update additional rs.initiate examples

Co-authored-by: Sarah Olson <sarah.olson@Sarahs-MacBook-Pro.local>

Co-authored-by: Sarah Olson <sarah.olson@Sarahs-MacBook-Pro.local>
Branch: v4.4
https://github.com/10gen/docs-mongodb-internal/commit/d7ef51bff12e18e72a0365384bc472252e71c07d

Comment by Githook User [ 11/Feb/22 ]

Author:

{'name': 'Sarah Olson', 'email': '98367156+sarah-olson-mongodb@users.noreply.github.com', 'username': 'sarah-olson-mongodb'}

Message: Docs 14623 (#512) (#616)

  • DOCS-14623: Update additional rs.initiate examples

Co-authored-by: Sarah Olson <sarah.olson@Sarahs-MacBook-Pro.local>

Co-authored-by: Sarah Olson <sarah.olson@Sarahs-MacBook-Pro.local>
Branch: v5.0
https://github.com/10gen/docs-mongodb-internal/commit/628b65ad0c125ecab9314f6765a32cefbe02befa

Comment by Githook User [ 11/Feb/22 ]

Author:

{'name': 'Sarah Olson', 'email': '98367156+sarah-olson-mongodb@users.noreply.github.com', 'username': 'sarah-olson-mongodb'}

Message: Docs 14623 (#512) (#615)

  • DOCS-14623: Update additional rs.initiate examples

Co-authored-by: Sarah Olson <sarah.olson@Sarahs-MacBook-Pro.local>

Co-authored-by: Sarah Olson <sarah.olson@Sarahs-MacBook-Pro.local>
Branch: v5.2
https://github.com/10gen/docs-mongodb-internal/commit/a6cd639326f0648ed1dc79b91d27dd94ad798cac

Comment by Githook User [ 10/Feb/22 ]

Author:

{'name': 'Sarah Olson', 'email': '98367156+sarah-olson-mongodb@users.noreply.github.com', 'username': 'sarah-olson-mongodb'}

Message: Docs 14623 (#512)

  • DOCS-14623: Update additional rs.initiate examples

Co-authored-by: Sarah Olson <sarah.olson@Sarahs-MacBook-Pro.local>
Branch: master
https://github.com/10gen/docs-mongodb-internal/commit/6b985ecbfc3a69f5aa135cf6dc8e99b215c687a8

Comment by Sarah Olson [ 08/Feb/22 ]

Hi pierre.depretz! Can you please take a look at the above PR and let me know if you have additional edits or questions?

Thanks a ton in advance!

Comment by Sarah Olson [ 04/Feb/22 ]

PR https://github.com/10gen/docs-mongodb-internal/pull/512

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