[SERVER-36355] Improve error message when shard key not present in all documents Created: 30/Jul/18  Updated: 29/Oct/23  Resolved: 22/Oct/18

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.1.4, 4.0.10

Type: Improvement Priority: Major - P3
Reporter: Andrew Davidson Assignee: Natalie Tsvetkova
Resolution: Fixed Votes: 0
Labels: ShardingRoughEdges, neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.0
Sprint: Sharding 2018-10-22, Sharding 2018-11-05
Participants:
Case:

 Description   

The checkShardingIndex command returns the following error message if any of the documents in the target collection do not contain the shard key fields:

"code": 96,
"codeName": "OperationFailed",
"errmsg": "found missing value in key { : null, : null }"

This error message should be optimized for user-education and next steps. For example it should probably say "Documents missing shard key fields - ensure all documents are updated to include all fields" or similar.



 Comments   
Comment by Githook User [ 07/May/19 ]

Author:

{'name': 'natalie.tsvetkova', 'username': 'ntsvetko', 'email': 'natalie.tsvetkova@mongodb.com'}

Message: SERVER-36355: Improve error message when shard key not present in all documents

(cherry picked from commit 9e71e5092e987354516f443db9d3f557f3ebf574)
Branch: v4.0
https://github.com/mongodb/mongo/commit/85d79aa9b83eaef8a6287382df89668aa59f1023

Comment by Githook User [ 22/Oct/18 ]

Author:

{'name': 'natalie.tsvetkova', 'email': 'natalie.tsvetkova@mongodb.com', 'username': 'ntsvetko'}

Message: SERVER-36355: Improve error message when shard key not present in all documents
Branch: master
https://github.com/mongodb/mongo/commit/9e71e5092e987354516f443db9d3f557f3ebf574

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