[SERVER-51192] IndexCatalogImpl::numIndexesTotal cannot assume all indexes are visible Created: 28/Sep/20  Updated: 29/Oct/23  Resolved: 05/Oct/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.9.0

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

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2020-10-19
Participants:
Linked BF Score: 40

 Description   

With the removal of the collection minimumVisibleSnapshot setting for index builds, certain assumptions about the index catalog can no longer be guaranteed when using AutoGetCollectionForRead.

When createIndexes determines whether an existing index already exists under a collection IX lock, it calls numIndexesTotal. In debug builds, this asserts that all indexes are visible in the current snapshot, which is no longer guaranteed by AutoGetCollectionForRead.

I think we should just remove the assertion in numIndexesTotal, since it's hard to enforce.



 Comments   
Comment by Githook User [ 05/Oct/20 ]

Author:

{'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}

Message: SERVER-51192 IndexCatalog::numIndexesTotal and numIndexesReady should not assert that all indexes are visible
Branch: master
https://github.com/mongodb/mongo/commit/24cf1dbc336636627e24aa1fce21e0e40888a52e

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