[SERVER-38069] Plan cache maintenance after rolling back index build mistakenly re-opens WT transaction Created: 09/Nov/18 Updated: 29/Oct/23 Resolved: 18/Dec/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance, Querying, Storage |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.7 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Charlie Swanson | Assignee: | Jacob Evans |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 45 | ||||||||||||
| Description |
|
When building an index we register a rollback handler to notify the CollectionInfoCache that the index was dropped:
This rollback handler can run if the index build is aborted. When it does, we refresh all the discriminators in the plan cache to keep our information up to date about which cache entries can be used by which queries:
Then, during updatePlanCacheIndexEntries we end up needing to call indexEntryFromCatalogEntry which ends up computing the set of multikey paths. In the case of a wildcard index, this involves opening a cursor on the storage engine. james.wahlin tells me that we don't actually need the multi key paths to update the indexability discriminators, so we should figure out some way to avoid this computation on this code path. We brainstormed some ideas about passing information into indexEntryFromCatalogEntry to communicate that you were uninterested in the multikey paths or more generally are unable to open a cursor. |
| Comments |
| Comment by Githook User [ 18/Dec/18 ] |
|
Author: {'email': 'jacob.evans@10gen.com', 'name': 'Jacob Evans'}Message: |
| Comment by Githook User [ 15/Dec/18 ] |
|
Author: {'username': 'GWlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'name': 'Gregory Wlodarek'}Message: Revert " This reverts commit ac39ac47d776bbd0f442f945d4ae6091b73cfb03. |
| Comment by Githook User [ 14/Dec/18 ] |
|
Author: {'email': 'jacob.evans@10gen.com', 'name': 'Jacob Evans'}Message: |