Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-11970

The convertShardKeyToHashed usage described incorrectly

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • None
    • Server
    • None

    Description

      ----------------------------

      Original Description

      In the documentation here we have the following example:

      convertShardKeyToHashed( { _id: ObjectId("5b2be413c06d924ab26ff9ca") } )
      

      That is incorrect and will produce a different hash value from the one that gets produced by the server for a hashed index.

      As pointed out by kevin.pulo on SERVER-32889, the correct usage would be:

      convertShardKeyToHashed( ObjectId("5b2be413c06d924ab26ff9ca") )
      

      ----------------------------

      Description

      Scope of changes (files that need work and how much)

      Impact to other docs outside of this product

      MVP (work and date?)

      Resources (e.g. Scope Docs, Invision)

      Attachments

        Activity

          People

            kay.kim@mongodb.com Kay Kim (Inactive)
            dmitry.ryabtsev@mongodb.com Dmitry Ryabtsev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              5 years, 25 weeks, 6 days ago