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

Consider linking to documentation in the sharded upsert error message

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Diagnostics
    • Labels:
      None
    • Query

      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".

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

              Created:
              Updated:
              Resolved: