[CDRIVER-3819] Unclear whether a collation is an expected option when renaming a collection Created: 25/Nov/20  Updated: 28/Oct/23  Resolved: 08/Dec/20

Status: Closed
Project: C Driver
Component/s: docs, libmongoc
Affects Version/s: None
Fix Version/s: 1.18.0, 1.18.0-alpha

Type: Improvement Priority: Minor - P4
Reporter: Nataly Carbonell Assignee: Roberto Sanchez
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The Swift driver is implementing a renameCollection helper that wraps mongoc_collection_rename_with_opts(). It's unclear whether collation is an expected option or not. 
The libmongoc docs  mention that collation can be one of the options. However, there is no mention of it in the MongoDB Docs

 



 Comments   
Comment by Githook User [ 08/Dec/20 ]

Author:

{'name': 'Roberto C. Sánchez', 'email': 'roberto@connexer.com', 'username': 'rcsanchez97'}

Message: CDRIVER-3819 collation is not an option for collection rename
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/65dc45e79555a575bb00848bafdb2740b9788177

Comment by Roberto Sanchez [ 07/Dec/20 ]

kevin.albertson I concur with your findings. PR is on the way.

Comment by Kevin Albertson [ 30/Nov/20 ]

Thanks for the report nataly.carbonell! collation is not an option expected by the server judging from the MongoDB documentation and behavior from the shell:

rs0:PRIMARY> db.adminCommand({renameCollection: "test.test", to: "test.test2", collation: {strength: 4}})
{
	"ok" : 0,
	"errmsg" : "BSON field 'renameCollection.collation' is an unknown field.",
	"code" : 40415,
	"codeName" : "Location40415",
	"$clusterTime" : {
		"clusterTime" : Timestamp(1606768833, 1),
		"signature" : {
			"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
			"keyId" : NumberLong(0)
		}
	},
	"operationTime" : Timestamp(1606768833, 1)
}

libmongoc documentation should be updated.

Generated at Wed Feb 07 21:19:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.