[SERVER-73265] Avoid failing a query if multiplanning results in an error due to hiding or dropping an index Created: 24/Jan/23  Updated: 08/Feb/23

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

Type: Improvement Priority: Major - P3
Reporter: Nicholas Zolnierz Assignee: Backlog - Query Optimization
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File hide_index_during_concurrent_query.js    
Issue Links:
Related
Assigned Teams:
Query Optimization
Participants:
Case:

 Description   

When multiplanning, the server will fail an entire query if a candidate plans fails during the evaluation period. This may make sense for cases like a collection drop, but for something like an index drop (or hiding an index) then it could be reasonable to replan the query from scratch instead of failing.

This can happen fairly easily if a user wants to clean up any unused indexes, which would typically be done by inspecting the results of $indexStats. However this approach can be misleading because $indexStats will not show queries which used (or are using) the index for plan selection, but ultimately do not end up using the index for the winning plan.

There is an existing concurrency test that demonstrates similar behavior to what this ticket describes, however there doesn't necessarily need to be a replan or cached plan involved.


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