Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-31722

Consider linking to documentation in the sharded upsert error message

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Diagnostics
    • None
    • Query

    Description

      Currently in a sharded environment, the replacement document must contain the shard key. If not an error similar to the following can be generated:

      "errmsg" : "An upsert on a sharded collection must contain the shard key and have the simple collation. Update request: { q: { _id: 2.0 }, u: { a: 4.0 }, multi: false, upsert: true, collation: { locale: \"simple\" } }, shard key pattern: { _id: \"hashed\" }"
      

      It may be helpful to provide a link to the relevant documentation along with the error message. Users may be confused by the current message since q does contain the shard key and the locale is set as the expected "simple".

      Attachments

        Activity

          People

            backlog-server-query Backlog - Query Team (Inactive)
            christopher.harris@mongodb.com Chris Harris
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: