[SERVER-47889] Hidden index tests should verify index filter behaviour Created: 01/May/20 Updated: 29/Oct/23 Resolved: 08/May/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.0-rc6, 4.7.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Bernard Gorman | Assignee: | Ruoxin Xu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Backport Requested: |
v4.4
|
||||
| Sprint: | Query 2020-05-18 | ||||
| Participants: | |||||
| Description |
|
In addition to their current coverage, the index filter tests should verify that:
|
| Comments |
| Comment by Githook User [ 08/May/20 ] |
|
Author: {'name': 'Ruoxin Xu', 'email': 'ruoxin.xu@mongodb.com', 'username': 'RuoxinXu'}Message: (cherry picked from commit 3f124535f04261cb5b9c85528d0971e44ec77128) |
| Comment by Githook User [ 08/May/20 ] |
|
Author: {'name': 'Ruoxin Xu', 'email': 'ruoxin.xu@mongodb.com', 'username': 'RuoxinXu'}Message: |
| Comment by Bernard Gorman [ 07/May/20 ] |
|
Re: ruoxin.xu's comment above: We briefly considered changing the scope of this ticket to alter the behaviour of index filters as follows:
However, we ultimately decided to leave the behaviour as-is. The purpose of hiding an index is to simulate what would happen if it were dropped, and we should therefore not add special logic to avoid the consequences just because an index filter is present. If we were to ignore the index filter when its associated index is hidden, so that the planner instead starts choosing non-filter indexes, then the user might be lulled into a false sense of security; dropping the hidden index with the index filter still present would immediately begin producing COLLSCANS instead, since the filter would now match zero indexes. |
| Comment by Ruoxin Xu [ 06/May/20 ] |
|
Just to be clear about an edge case for the definition above - if the index filter captures 0 index, according to the definition, we should 'hide' this index filter as well. This may affect the current behaviour when the user sets a non-existent index, which would make the planner apply the filter filtering all the indexes and the user will just get a COLLSCAN. This change that enables 'hiding' a filter will cause the current behaviour for 'setting on a non-existent index' also 'hide' the filter. Do we also expect this behaviour for index filter? |