[SERVER-33087] Fix the use of dropTarget in renameCollection Created: 02/Feb/18  Updated: 29/Oct/23  Resolved: 28/Feb/18

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 3.6.4, 3.7.3

Type: Bug Priority: Major - P3
Reporter: Judah Schvimer Assignee: Xiangyu Yao (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Duplicate
is duplicated by SERVER-32360 Rename collection with dropTarget sho... Closed
Related
related to SERVER-33956 A sequence of rename and create colle... Closed
related to SERVER-34727 Rename collection during initial sync... Closed
is related to SERVER-33086 renameCollection target should never ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.6
Sprint: Storage 2018-02-12, Storage NYC 2018-03-12
Participants:
Linked BF Score: 4

 Description   

1. renameCollection dropTarget doesn't use dropTarget UUID
renameCollection uses the namespace of the target collection, even when an oplog entry provides the correct UUID to drop. During initial sync it is possible that the target collection (by name) in the target database is not actually the collection that was dropped, and the UUID is required. This leads to dropping the wrong collection. During oplog application with UUIDs we should always drop the UUID mentioned if provided and never drop any other UUID.
2. Rename collection with dropTarget should drop the target even if the source doesn't exist



 Comments   
Comment by Githook User [ 28/Feb/18 ]

Author:

{'email': 'xiangyu.yao@mongodb.com', 'name': 'Xiangyu Yao', 'username': 'xy24'}

Message: SERVER-33087 Fix the use of dropTarget in renameCollection

(cherry picked from commit 23a23c07c556508e87950cf796183cede9befe83)
Branch: v3.6
https://github.com/mongodb/mongo/commit/bebe348a6be2a322c1762028343b3bfee7c4f189

Comment by Githook User [ 28/Feb/18 ]

Author:

{'email': 'xiangyu.yao@mongodb.com', 'name': 'Xiangyu Yao', 'username': 'xy24'}

Message: SERVER-33087 Fix the use of dropTarget in renameCollection
Branch: master
https://github.com/mongodb/mongo/commit/23a23c07c556508e87950cf796183cede9befe83

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