[SERVER-79982] Batched catalog writers can run concurrently with HistoricalCatalogIdTracker::cleanup() and lead to incorrect PIT find results. Created: 14/Aug/23  Updated: 15/Dec/23  Resolved: 08/Sep/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.0-rc0, 7.0.2, 7.1.0-rc2, 6.0.13, 5.0.24

Type: Bug Priority: Critical - P2
Reporter: Suganthi Mani Assignee: Jordi Olivares Provencio
Resolution: Fixed Votes: 0
Labels: auto-reverted
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Problem/Incident
Assigned Teams:
Storage Execution EMEA
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.1, v7.0, v6.0, v5.0
Sprint: Execution EMEA Team 2023-09-18
Participants:
Linked BF Score: 167

 Description   

This comment here is incorrect. Timestamp monitor doesn't take global lock while callbacks are executed. This means we can have concurrent batched catalog writers during HistoricalCatalogIdTracker::cleanup() and can result in below bugs- 1) server crash due to this invariant failure 2) more serious data inconsistency bug - Find command returning incorrect results when the sequence is as follows:

1) HistoricalCatalogIdTracker::cleanup() makes a copy of _nss
2) HistoricalCatalogIdTracker::Create() updates _nss with new catalog id info
3) HistoricalCatalogIdTracker::cleanup updates the persistent copy.



 Comments   
Comment by Githook User [ 15/Dec/23 ]

Author:

{'name': 'Jordi Olivares Provencio', 'email': 'jordi.olivares-provencio@mongodb.com', 'username': 'jordiolivares'}

Message: SERVER-79982 Take GlobalLock when cleaning up the catalog

GitOrigin-RevId: 8bd81c2b26b0cddcabcfde059ac66344d7844383
Branch: v5.0
https://github.com/mongodb/mongo/commit/80a87c534aae0a620fb5d1a6c97e523330f0c0e9

Comment by Githook User [ 15/Dec/23 ]

Author:

{'name': 'Jordi Olivares Provencio', 'email': 'jordi.olivares-provencio@mongodb.com', 'username': 'jordiolivares'}

Message: SERVER-79982 Take GlobalLock when cleaning up the catalog

GitOrigin-RevId: 4a3fd232233a59e087f8d7376af573b944926161
Branch: v6.0
https://github.com/mongodb/mongo/commit/408d2797c21de2e5159d013447fc1ae1452e537a

Comment by Githook User [ 08/Sep/23 ]

Author:

{'name': 'Jordi Olivares Provencio', 'email': 'jordi.olivares-provencio@mongodb.com', 'username': 'jordiolivares'}

Message: SERVER-79982 Take GlobalLock when cleaning up the catalog
Branch: master
https://github.com/mongodb/mongo/commit/b62885bf8b51816872684de6c92db8b2a4281d50

Comment by Githook User [ 08/Sep/23 ]

Author:

{'name': 'Jordi Olivares Provencio', 'email': 'jordi.olivares-provencio@mongodb.com', 'username': 'jordiolivares'}

Message: SERVER-79982 Take GlobalLock when cleaning up the catalog
Branch: v7.1
https://github.com/mongodb/mongo/commit/dad4c5cfeeb009b7190cb23091dbc6de20a63cb7

Comment by Githook User [ 08/Sep/23 ]

Author:

{'name': 'Jordi Olivares Provencio', 'email': 'jordi.olivares-provencio@mongodb.com', 'username': 'jordiolivares'}

Message: SERVER-79982 Take GlobalLock when cleaning up the catalog
Branch: v7.0
https://github.com/mongodb/mongo/commit/3b4677e14e2198751facb8cd762cdb40f6d55aaf

Comment by Githook User [ 08/Sep/23 ]

Author:

{'name': 'Jordi Olivares Provencio', 'email': 'jordi.olivares-provencio@mongodb.com', 'username': 'jordiolivares'}

Message: Revert "SERVER-79982 Take GlobalLock when cleaning up the catalog"

This reverts commit d77c09cef3847855c6d12b8abfd909a85a2105b5.
Branch: v7.1
https://github.com/mongodb/mongo/commit/4f3972a7d990cea8cbb01047127be19ee3286ad2

Comment by Githook User [ 08/Sep/23 ]

Author:

{'name': 'Jordi Olivares Provencio', 'email': 'jordi.olivares-provencio@mongodb.com', 'username': 'jordiolivares'}

Message: Revert "SERVER-79982 Take GlobalLock when cleaning up the catalog"

This reverts commit f9e5c019fb4f0f588a21836780d6cc510b0a90c7.
Branch: v7.0
https://github.com/mongodb/mongo/commit/0f4a646ea23887997c263d5e5e457a5299a3c0e9

Comment by xgen-buildbaron-user [ 07/Sep/23 ]

Ticket re-opened due to revert. benchmarks_orphaned_second_half began a consistent failure of build/install/bin/collection_catalog_bm

Comment by Githook User [ 07/Sep/23 ]

Author:

{'name': 'auto-revert-processor', 'email': 'dev-prod-dag@mongodb.com', 'username': ''}

Message: Revert "SERVER-79982 Take GlobalLock when cleaning up the catalog"

This reverts commit 3338e138622314b119bfa11ca68fbf1d98430f4f.
Branch: master
https://github.com/mongodb/mongo/commit/29243ed928ec4560efef793dd6e39d0d918c5d4c

Comment by Githook User [ 06/Sep/23 ]

Author:

{'name': 'Jordi Olivares Provencio', 'email': 'jordi.olivares-provencio@mongodb.com', 'username': 'jordiolivares'}

Message: SERVER-79982 Take GlobalLock when cleaning up the catalog
Branch: v7.0
https://github.com/mongodb/mongo/commit/f9e5c019fb4f0f588a21836780d6cc510b0a90c7

Comment by Githook User [ 06/Sep/23 ]

Author:

{'name': 'Jordi Olivares Provencio', 'email': 'jordi.olivares-provencio@mongodb.com', 'username': 'jordiolivares'}

Message: SERVER-79982 Take GlobalLock when cleaning up the catalog
Branch: v7.1
https://github.com/mongodb/mongo/commit/d77c09cef3847855c6d12b8abfd909a85a2105b5

Comment by Githook User [ 06/Sep/23 ]

Author:

{'name': 'Jordi Olivares Provencio', 'email': 'jordi.olivares-provencio@mongodb.com', 'username': 'jordiolivares'}

Message: SERVER-79982 Take GlobalLock when cleaning up the catalog
Branch: master
https://github.com/mongodb/mongo/commit/3338e138622314b119bfa11ca68fbf1d98430f4f

Comment by Jordi Olivares Provencio [ 04/Sep/23 ]

As this code was introduced in 6.2 I'm requesting a backport to 7.0 and 7.1

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