[SERVER-42639] Rollback should use the collection UUID and not its name to create directories Created: 06/Aug/19  Updated: 08/Jan/24  Resolved: 09/Aug/19

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

Type: Improvement Priority: Major - P3
Reporter: Gregory Wlodarek Assignee: Gregory Wlodarek
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-41746 Test varying lengths of collection names Closed
Documented
is documented by DOCS-12950 Investigate changes in SERVER-42639: ... Closed
Problem/Incident
Related
related to SERVER-35746 Rollback cannot write rollback files ... Closed
related to SERVER-42645 MigrationDestinationManager should us... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2019-08-12
Participants:
Linked BF Score: 15

 Description   

With the removal of collection name length limits, rollback should not use the collection name to create a directory but should rather use the collection UUID as we cannot create directories on the file system with very long names.

See here.



 Comments   
Comment by Githook User [ 09/Aug/19 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-42639 Fix rollback via refetch file checker in the JS rollback library
Branch: master
https://github.com/mongodb/mongo/commit/323820bfd9b3932632e45c885a7eaf7524956342

Comment by Githook User [ 09/Aug/19 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-42639 Rollback should use the collection UUID and not its name to create directories
Branch: master
https://github.com/mongodb/mongo/commit/ab0be2454c72774940219328a34dbc4d4b40d4cb

Comment by Alyson Cabral (Inactive) [ 08/Aug/19 ]

Ok, I'm good with this change. Please mark it as docs changes needed and we'll get the right info to our users

Comment by Gregory Wlodarek [ 08/Aug/19 ]

Users can run listCollections to find the UUID <-> collection name mapping

MongoDB Enterprise > db.runCommand({listCollections: 1})
{
	"cursor" : {
		"id" : NumberLong(0),
		"ns" : "db.$cmd.listCollections",
		"firstBatch" : [
			{
				"name" : "test",
				"type" : "collection",
				"options" : {
 
				},
				"info" : {
					"readOnly" : false,
					"uuid" : UUID("f2140024-f8cf-4e30-a841-24d68e4e8c3c")
				},
				"idIndex" : {
					"v" : 2,
					"key" : {
						"_id" : 1
					},
					"name" : "_id_"
				}
			}
		]
	},
	"ok" : 1
}

Comment by Alyson Cabral (Inactive) [ 08/Aug/19 ]

Ah, so this is just about changing the naming of rollback files. How will users be able to grab a UUID for the collection and map it back to the file?

Comment by Mira Carey [ 06/Aug/19 ]

Added a sharding ticket for the migration destination manager issue, assuming we think this is a good issue to tackle systemically

Comment by Gregory Wlodarek [ 06/Aug/19 ]

In addition, it looks like the MigrationDestinationManager uses fully qualified names rather than UUIDs to create directories here.

CC: mira.carey@mongodb.com

Comment by Max Hirschhorn [ 06/Aug/19 ]

The idea of using UUIDs for rollback files had also come up in SERVER-35746.

Generated at Thu Feb 08 05:01:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.