[SERVER-31722] Consider linking to documentation in the sharded upsert error message Created: 25/Oct/17  Updated: 06/Dec/22  Resolved: 27/Oct/17

Status: Closed
Project: Core Server
Component/s: Diagnostics
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Chris Harris Assignee: Backlog - Query Team (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query
Participants:

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



 Comments   
Comment by Charlie Swanson [ 27/Oct/17 ]

We don't have any plans to add one-off links to documentation from errors and we're not sure if there's pre-existing documentation anyway. christopher.harris It's possible that the best next step here should be a DOCS ticket if that documentation is in fact needed and not created yet.

Generated at Thu Feb 08 04:28:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.