[SERVER-58385] recovery oplog application updates multikey info on wrong collection Created: 09/Jul/21  Updated: 29/Oct/23  Resolved: 05/Oct/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.4.11, 4.4.10, 5.0.4, 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
related to SERVER-58386 assign unique collection names to tes... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.0, v4.4, v4.2, v4.0
Sprint: Execution Team 2021-07-26
Participants:
Linked BF Score: 70

 Description   

The list of multikey updates is batched and keyed by collection name during oplog application OplogApplierImpl::_applyOplogBatch. In a recovery scenario where there may be multiple collections with the same name at different points in history, this mapping could be problematic. Downstream components such as the replication StorageInterface::setIndexIsMultikey() would be less prone to looking up the wrong collection from the collection catalog if given the collection UUID.

A more robust way to maintain the multikey information to update would be to use the collection UUID rather than the namespace.



 Comments   
Comment by Githook User [ 13/Oct/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-58385 StorageInterfaceImpl::setIndexIsMultikey() looks up collection by UUID instead of namespace

(cherry picked from commit 087c24f14c4dca91eade6dff3563649f6edbe6c7)
Branch: v4.4
https://github.com/mongodb/mongo/commit/556a8f646b06609857e96c9735e4669c2598af7f

Comment by Githook User [ 11/Oct/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-58385 add SetIndexIsMultikeyLooksUpCollectionByUUID test case to StorageInterfaceImplTest suite

This test characterizes the current behavior where we still look up the collection by namespace, so the
expected result from passing an invalid namespace together with the correct UUID should return
a NamespaceNotFound error.

(cherry picked from commit d587a23122d5e64a828eb182bbe3f311541d89a2)
Branch: v4.4
https://github.com/mongodb/mongo/commit/1643c1534245331b67808d0dec834e6ece41d1be

Comment by Githook User [ 11/Oct/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-58385 StorageInterface::setIndexIsMultikey() accepts collection UUID

(cherry picked from commit faaca3440968820be133979d503bbe048eb69e4b)
Branch: v4.4
https://github.com/mongodb/mongo/commit/46aee5d6e90af75dacc46c3367cfb90a92260ffe

Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 04/Oct/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: Revert "SERVER-58385 StorageInterface::setIndexIsMultikey() accepts collection UUID"

This reverts commit a53ec12efc9f58a56fa7255ffed2e926d33e8269.
Branch: v4.4
https://github.com/mongodb/mongo/commit/6940a21899491ade7aab2fb95bfffc7fcd8d2e5c

Comment by Githook User [ 04/Oct/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-58385 StorageInterface::setIndexIsMultikey() accepts collection UUID

(cherry picked from commit faaca3440968820be133979d503bbe048eb69e4b)
Branch: v4.4
https://github.com/mongodb/mongo/commit/a53ec12efc9f58a56fa7255ffed2e926d33e8269

Comment by Githook User [ 01/Oct/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-58385 add collection UUID to MultikeyPathInfo

(cherry picked from commit 2bb9844342e8c4c3201cdcbb8e84cc0618505ea0)
Branch: v4.4
https://github.com/mongodb/mongo/commit/2fd7e5d8f09ffdc22ebbd229cf40b1c6dda1c8fc

Comment by Githook User [ 20/Sep/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-58385 StorageInterfaceImpl::setIndexIsMultikey() looks up collection by UUID instead of namespace

(cherry picked from commit 087c24f14c4dca91eade6dff3563649f6edbe6c7)
Branch: v5.0
https://github.com/mongodb/mongo/commit/a4e6dbae87a2c801d3f2ea09b78fb9cba4cdd62c

Comment by Githook User [ 20/Sep/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-58385 add SetIndexIsMultikeyLooksUpCollectionByUUID test case to StorageInterfaceImplTest suite

This test characterizes the current behavior where we still look up the collection by namespace, so the
expected result from passing an invalid namespace together with the correct UUID should return
a NamespaceNotFound error.

(cherry picked from commit d587a23122d5e64a828eb182bbe3f311541d89a2)
Branch: v5.0
https://github.com/mongodb/mongo/commit/a7a9a9bc261f9bb34714d9ec05b8e93c548b1bb6

Comment by Githook User [ 20/Sep/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-58385 StorageInterface::setIndexIsMultikey() accepts collection UUID

(cherry picked from commit faaca3440968820be133979d503bbe048eb69e4b)
Branch: v5.0
https://github.com/mongodb/mongo/commit/324b793cfe9493c8ceae519a9fe58de131c91eb6

Comment by Githook User [ 20/Sep/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-58385 add collection UUID to MultikeyPathInfo

(cherry picked from commit 2bb9844342e8c4c3201cdcbb8e84cc0618505ea0)
Branch: v5.0
https://github.com/mongodb/mongo/commit/f4f9b167fb9fabdcf19d1b09a81ca9c4f70624d7

Comment by Githook User [ 20/Jul/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-58385 StorageInterfaceImpl::setIndexIsMultikey() looks up collection by UUID instead of namespace
Branch: master
https://github.com/mongodb/mongo/commit/087c24f14c4dca91eade6dff3563649f6edbe6c7

Comment by Githook User [ 20/Jul/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-58385 add SetIndexIsMultikeyLooksUpCollectionByUUID test case to StorageInterfaceImplTest suite

This test characterizes the current behavior where we still look up the collection by namespace, so the
expected result from passing an invalid namespace together with the correct UUID should return
a NamespaceNotFound error.
Branch: master
https://github.com/mongodb/mongo/commit/d587a23122d5e64a828eb182bbe3f311541d89a2

Comment by Githook User [ 19/Jul/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-58385 StorageInterface::setIndexIsMultikey() accepts collection UUID
Branch: master
https://github.com/mongodb/mongo/commit/faaca3440968820be133979d503bbe048eb69e4b

Comment by Githook User [ 19/Jul/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-58385 add collection UUID to MultikeyPathInfo
Branch: master
https://github.com/mongodb/mongo/commit/2bb9844342e8c4c3201cdcbb8e84cc0618505ea0

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