Operational Defect Database

BugZero found this defect 2357 days ago.

MongoDB | 425846

[SERVER-31018] Secondaries generate a UUID for a replicated collection on their own if one isn't provided

Last update date:

10/30/2023

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

3.6.0-rc0

Description:

Info

If a secondary during steady-state replication receives an oplog entry for creating a collection without a UUID while it is in featureCompatibilityVersion=3.6, then it must abort because the alternative is data corruption. Note: This issue was only found due to a race condition in the "setFeatureCompatibilityVersion" command allowing for this possibility (SERVER-31017). I suspect it is possible to simulate this more easily in sync_tail_test.cpp by using the multiSyncApply_noAbort() function. 2017-09-10T10:58:45.756-0400 2017-09-10T10:58:45.752-0400 E QUERY [thread1] Error: [{ 2017-09-10T10:58:45.756-0400 "name" : "mycoll", 2017-09-10T10:58:45.756-0400 "type" : "collection", 2017-09-10T10:58:45.756-0400 "options" : { 2017-09-10T10:58:45.757-0400 2017-09-10T10:58:45.757-0400 }, 2017-09-10T10:58:45.757-0400 "info" : { 2017-09-10T10:58:45.757-0400 "readOnly" : false 2017-09-10T10:58:45.757-0400 }, 2017-09-10T10:58:45.757-0400 "idIndex" : { 2017-09-10T10:58:45.757-0400 "v" : 2, 2017-09-10T10:58:45.757-0400 "key" : { 2017-09-10T10:58:45.757-0400 "_id" : 1 2017-09-10T10:58:45.757-0400 }, 2017-09-10T10:58:45.758-0400 "name" : "_id_", 2017-09-10T10:58:45.758-0400 "ns" : "test.mycoll" 2017-09-10T10:58:45.758-0400 } 2017-09-10T10:58:45.758-0400 }] != [{ 2017-09-10T10:58:45.758-0400 "name" : "mycoll", 2017-09-10T10:58:45.758-0400 "type" : "collection", 2017-09-10T10:58:45.758-0400 "options" : { 2017-09-10T10:58:45.758-0400 2017-09-10T10:58:45.758-0400 }, 2017-09-10T10:58:45.758-0400 "info" : { 2017-09-10T10:58:45.758-0400 "readOnly" : false, 2017-09-10T10:58:45.759-0400 "uuid" : UUID("440a716d-c32d-49d0-a39b-87c564ac61c6") 2017-09-10T10:58:45.759-0400 }, 2017-09-10T10:58:45.759-0400 "idIndex" : { 2017-09-10T10:58:45.759-0400 "v" : 2, 2017-09-10T10:58:45.759-0400 "key" : { 2017-09-10T10:58:45.759-0400 "_id" : 1 2017-09-10T10:58:45.760-0400 }, 2017-09-10T10:58:45.760-0400 "name" : "_id_", 2017-09-10T10:58:45.760-0400 "ns" : "test.mycoll" 2017-09-10T10:58:45.760-0400 } 2017-09-10T10:58:45.760-0400 }] are not equal : Expected primary and secondary to have the same collection metadata :

Top User Comments

xgen-internal-githook commented on Fri, 29 Sep 2017 21:09:42 +0000: Author: {'email': 'geert@mongodb.com', 'name': 'Geert Bosch', 'username': 'GeertBosch'} Message: SERVER-31018 Fix lint Branch: master https://github.com/mongodb/mongo/commit/87b23ef60c1d3c32d98e5c38c598664223434a80 xgen-internal-githook commented on Fri, 29 Sep 2017 20:21:43 +0000: Author: {'email': 'geert@mongodb.com', 'name': 'Geert Bosch', 'username': 'GeertBosch'} Message: SERVER-31018 Prevent secondaries from generating UUIDs for replicated collections Branch: master https://github.com/mongodb/mongo/commit/ffe44d0f3cd68721a9cdc34d0974fad604f0f4c7

Additional Resources / Links

Share:

BugZero Risk Score

Coming soon

Status

Closed

Have you been affected by this bug?

cost-cta-background

Do you know how much operational outages are costing you?

Understand the cost to your business and how BugZero can help you reduce those costs.

Discussion

Login to read and write comments.

Have you ever...

had your data corrupted from a

VMware

bug?

Search:

...