[SERVER-31952] return error if collMod provides a UUID that does not match the UUID of the collection specified Created: 13/Nov/17  Updated: 30/Oct/23  Resolved: 21/Nov/17

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 3.6.1, 3.7.1

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

Issue Links:
Backports
Related
Backwards Compatibility: Fully Compatible
Backport Requested:
v3.6
Sprint: Storage 2017-12-04
Participants:
Linked BF Score: 0

 Description   

We turn collMods into noops if the UUID doesn't match, but really this means there is a bug:
https://github.com/mongodb/mongo/blob/bace2a3017ebd46ca96cc81f48f039b80e00d92a/src/mongo/db/catalog/coll_mod.cpp#L428-L443



 Comments   
Comment by Githook User [ 07/Dec/17 ]

Author:

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

Message: SERVER-31952 Return error if collMod provides a UUID that does not match the UUID of the collection specified

(cherry picked from commit de7324dc370bc2a0c8367bbf0ce97314bce2802a)
Branch: v3.6
https://github.com/mongodb/mongo/commit/91967bd82ef848129c02c2f5641e304f141b80d3

Comment by Githook User [ 21/Nov/17 ]

Author:

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

Message: SERVER-31952 Return error if collMod provides a UUID that does not match the UUID of the collection specified
Branch: master
https://github.com/mongodb/mongo/commit/de7324dc370bc2a0c8367bbf0ce97314bce2802a

Comment by Judah Schvimer [ 14/Nov/17 ]

yes, that seems reasonable, and would still cause secondaries to crash very quickly.

Comment by Eric Milkie [ 14/Nov/17 ]

judah.schvimer I agree we should do something here, but would it be okay to simply log an explanatory message and return a bad Status? That particular code path is used by more than just collModForUUIDUpgrade().

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