[SERVER-41600] IndexCatalog::refreshEntry should invalidate the index from the CollectionInfoCache Created: 10/Jun/19  Updated: 29/Oct/23  Resolved: 19/Jun/19

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 4.2.0-rc0
Fix Version/s: 4.2.0-rc3, 4.3.1, 4.0.20, 3.6.20

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

Issue Links:
Backports
Depends
Duplicate
is duplicated by SERVER-48916 Update plan cache IndexabilityDiscrim... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.2, v4.0, v3.6
Sprint: Execution Team 2019-07-01
Participants:
Linked BF Score: 61

 Description   

Normally, when an index is dropped, it is also invalidated in the CollectionInfoCache.

It looks like refreshEntry, which is used by collMod, will delete the IndexCatalogEntry, but never invalidates the index from the cache. This means that the cache may still attempt to use a refreshed index because it is not aware the original index entry was ever deleted.

We should call CollectionInfoCache::droppedIndex to ensure the query planner does not try to use a cached index that has been refreshed with refreshEntry.



 Comments   
Comment by Githook User [ 02/Aug/20 ]

Author:

{'name': 'Maria van Keulen', 'email': 'maria@mongodb.com', 'username': 'mvankeulen94'}

Message: SERVER-41600 Invalidate index from CollectionInfoCache in refreshEntry

(cherry picked from commit 5f21969e6ca6c7805df0165ff81677aed1199958)
Branch: v3.6
https://github.com/mongodb/mongo/commit/2a5be0c44b33f618dae743ccee344b00dcf76ef1

Comment by Githook User [ 24/Jul/20 ]

Author:

{'name': 'Maria van Keulen', 'email': 'maria@mongodb.com', 'username': 'mvankeulen94'}

Message: SERVER-41600 Invalidate index from CollectionInfoCache in refreshEntry

(cherry picked from commit 5f21969e6ca6c7805df0165ff81677aed1199958)
Branch: v4.0
https://github.com/mongodb/mongo/commit/0caa024d694509bdadd7a53e1b5b944025131631

Comment by Githook User [ 03/Jul/19 ]

Author:

{'name': 'Maria van Keulen', 'username': 'mvankeulen94', 'email': 'maria@mongodb.com'}

Message: SERVER-41600 Invalidate index from CollectionInfoCache in refreshEntry

(cherry picked from commit 5f21969e6ca6c7805df0165ff81677aed1199958)
Branch: v4.2
https://github.com/mongodb/mongo/commit/c00ebe6c5ab089097dc0d06207e55260b439c06e

Comment by Githook User [ 19/Jun/19 ]

Author:

{'name': 'Maria van Keulen', 'email': 'maria@mongodb.com', 'username': 'mvankeulen94'}

Message: SERVER-41600 Invalidate index from CollectionInfoCache in refreshEntry
Branch: master
https://github.com/mongodb/mongo/commit/5f21969e6ca6c7805df0165ff81677aed1199958

Generated at Thu Feb 08 04:58:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.