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

Consider linking to documentation in the sharded upsert error message

    XMLWordPrintable

    Details

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

      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

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

              Dates

              Created:
              Updated:
              Resolved:

                  PagerDuty