[SERVER-60324] Looking up already-removed index in IndexCatalogImpl::_logInternalState Created: 29/Sep/21  Updated: 29/Oct/23  Resolved: 11/Oct/21

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

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

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2021-10-18
Participants:
Linked BF Score: 31

 Description   

If there is unexpectedly still indexes present after removing all indexes via IndexCatalogImpl::dropAllIndexes, we log information about the leftover state in IndexCatalogImpl::_logInternalState. However, as a part of this, we log the indexes that we should have already dropped, including calling Collection::getIndexSpec for those indexes. This is incorrect since we cannot call this function for an index that no longer exists. We can fix this by either not logging this at all, or by first checking Collection::isIndexPresent.



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

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-60324 Fix up logs in `IndexCatalogImpl::_logInternalState`
Branch: master
https://github.com/mongodb/mongo/commit/9c72ff10477f6e4bbb01690aa40998bd28ad814e

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