[SERVER-75194] Enable success of all upsert commands with _id in the query through writeWithoutShardKey protocol Created: 23/Mar/23  Updated: 29/Oct/23  Resolved: 30/Mar/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.0-rc0

Type: Task Priority: Major - P3
Reporter: Sanika Phanse (Inactive) Assignee: Sanika Phanse (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Sharding NYC
Backwards Compatibility: Fully Compatible
Sprint: Sharding NYC 2023-04-03
Participants:

 Description   

Currently, update commands with

{upsert: true}

that filter on _id error with:

 {
	"nMatched" : 0,
	"nUpserted" : 0,
	"nModified" : 0,
	"writeError" : {
		"code" : 65,
		"errmsg" : " :: and :: Shard key update is not allowed without specifying the full shard key in the queryFor sharded collections getOwnershipFilter cannot be relied on without a valid shard versionFor sharded collections getOwnershipFilter cannot be relied on without a valid shard version",
		"errInfo" : {
			"causedBy" : [
				{
					"index" : 0,
					"code" : 31025,
					"errmsg" : "Shard key update is not allowed without specifying the full shard key in the query"
				},
				{
					"index" : 0,
					"code" : 7032301,
					"errmsg" : "For sharded collections getOwnershipFilter cannot be relied on without a valid shard version"
				},
				{
					"index" : 0,
					"code" : 7032301,
					"errmsg" : "For sharded collections getOwnershipFilter cannot be relied on without a valid shard version"
				}
			]
		}
	}
}



 Comments   
Comment by Githook User [ 30/Mar/23 ]

Author:

{'name': 'Sanika Phanse', 'email': 'sanika.phanse@mongodb.com', 'username': 'sphanse99'}

Message: SERVER-75194 Enable success of all upsert commands with _id in the query through writeWithoutShardKey protocol
Branch: master
https://github.com/mongodb/mongo/commit/6ea4a438870f1361a6f041f1caaf50c27bfab1a7

Generated at Thu Feb 08 06:29:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.