[SERVER-35746] Rollback cannot write rollback files for collections with weird names Created: 22/Jun/18  Updated: 27/Oct/23  Resolved: 29/Aug/19

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

Type: Bug Priority: Major - P3
Reporter: Judah Schvimer Assignee: Backlog - Replication Team
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
is related to SERVER-42639 Rollback should use the collection UU... Closed
Assigned Teams:
Replication
Operating System: ALL
Backport Requested:
v4.0
Participants:
Linked BF Score: 17

 Description   

It's possible to create collection names like "test.index_bounds_pipe/^a|b/". During rollback we try to write a rollback file for this but get the following error: FileNotOpen: couldn't create file: /data/db/job6/resmoke/node0/rollback/test.index_bounds_pipe/^a|b/.2018-06-20T16-00-53.0.bson for remove saving: No such file or directory. We should change these names to ones the file system recognizes and ensure that collisions are handled properly.



 Comments   
Comment by Gregory Wlodarek [ 29/Aug/19 ]

ratika.gandhi, yes! This should be fine to close. No backports have been made though so some of the BFs would have to remain open.

Comment by Ratika Gandhi [ 29/Aug/19 ]

gregory.wlodarek, Was this ticket fixed by SERVER-42639? If so, we will close this ticket.

Comment by Kyle Suarez [ 26/Jun/18 ]

Linux and Windows have a file name length limit of 255 characters. In MongoDB, total namespace length is restricted to 120 bytes or less. The escaping convention would work if it mapped illegal characters to escape sequences of no more than 2 in length; otherwise we'll have to do the UUID thing.

Some great test cases for this fix include

Comment by Spencer Brody (Inactive) [ 26/Jun/18 ]

An alternative to using the UUID is figure out an escaping convention to escape the special characters to filesystem-accepted characters.

Comment by Gregory McKeon (Inactive) [ 26/Jun/18 ]

We'll do escaping if it's simple enough, and use UUID's if it isn't.

Comment by Kyle Suarez [ 22/Jun/18 ]

If we use the UUID, we must mark documentation changes as required, as this breaks the old format.

Comment by Judah Schvimer [ 22/Jun/18 ]

max.hirschhorn suggested using the UUID. I support that.

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