[SERVER-74176] Investigate stable API versioning compatibility for the _internalCollation argument to $lookup Created: 17/Feb/23  Updated: 21/Feb/23

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

Type: Task Priority: Major - P3
Reporter: Naama Bareket Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Execution
Participants:

 Description   

When run with the `sharding_api_strict_passthrough.yml` suite, the following error results:

uncaught exception: Error: command failed: {
	"ok" : 0,
	"errmsg" : "The _internalCollation argument to $lookup is not supported in API Version 1",
	"code" : 323,
	"codeName" : "APIStrictError",
	"$clusterTime" : {
		"clusterTime" : Timestamp(1676579522, 82),
		"signature" : {
			"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
			"keyId" : NumberLong(0)
		}
	},
	"operationTime" : Timestamp(1676579522, 82)
} with original command request: {
	"aggregate" : "collation_lookup_without_default",
	"pipeline" : [
		{
			"$match" : {
				"_id" : "lowercase"
			}
		},
		{
			"$lookup" : {
				"from" : "collation_lookup_without_default",
				"localField" : "str",
				"foreignField" : "str",
				"as" : "matched",
				"_internalCollation" : {
					"locale" : "en_US",
					"strength" : 2
				}
			}
		}
	],
	"cursor" : {
 
 
	},
	"lsid" : {
		"id" : UUID("a83ad686-7f93-43fa-a0bf-3670aef39355")
	},
	"$clusterTime" : {
		"clusterTime" : Timestamp(1676579522, 82),
		"signature" : {
			"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
			"keyId" : NumberLong(0)
		}
	},
	"apiVersion" : "1",
	"apiStrict" : true
} on connection: connection to ip-10-128-182-11.ec2.internal:21045 : aggregate failed :
_getErrorWithCode@src/mongo/shell/utils.js:24:13
doassert@src/mongo/shell/assert.js:18:14
_assertCommandWorked@src/mongo/shell/assert.js:766:25
assert.commandWorked@src/mongo/shell/assert.js:860:16
DB.prototype._runAggregate@src/mongo/shell/db.js:283:12
DBCollection.prototype.aggregate@src/mongo/shell/collection.js:974:21
runTests@jstests/sharding/query/collation_lookup.js:304:20
@jstests/sharding/query/collation_lookup.js:602:9
@jstests/sharding/query/collation_lookup.js:629:3
failed to load: jstests/sharding/query/collation_lookup.js
exiting with code -3 


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