[SERVER-47584] Additional testing for hidden indexes Created: 16/Apr/20  Updated: 29/Oct/23  Resolved: 30/Apr/20

Status: Closed
Project: Core Server
Component/s: Index Maintenance, Testing Infrastructure
Affects Version/s: None
Fix Version/s: 4.4.0-rc4, 4.7.0

Type: Improvement Priority: Major - P3
Reporter: Ruoxin Xu Assignee: Ruoxin Xu
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.4
Sprint: Query 2020-04-20, Query 2020-05-04
Participants:
Linked BF Score: 9

 Description   

Extend testing coverage for 'hidden index'.
1. Ensure the query plan cache will be cleared for the given collection on hiding or unhiding an index.
2. Ensure hidden indexes will not be not visible for use by index filters.
3. Allow users to determine whether an index is hidden via the $indexStats aggregation stage.
4. Leave index usage statistics intact when an index is hidden. They will remain static due to non-use while hidden. Once unhidden they will continue from where they left off on use.
5. Replicate hidden index state on collMod or createIndexes
6. Persist hidden index state in the index catalog (i.e. hidden index remains hidden after restart)
7. Ensure the 'hidden' flag can be found in currentOp and profiler.



 Comments   
Comment by Githook User [ 30/Apr/20 ]

Author:

{'name': 'Ruoxin Xu', 'email': 'ruoxin.xu@mongodb.com', 'username': 'RuoxinXu'}

Message: SERVER-47584 Additional testing for hidden indexes

(cherry picked from commit e8fea93bf76fd89dc25cd664888b4959b472b2f9)
Branch: v4.4
https://github.com/mongodb/mongo/commit/6a4f2a64ff3f1f1673c5cddc7b801125829f9fbe

Comment by Githook User [ 29/Apr/20 ]

Author:

{'name': 'Ruoxin Xu', 'email': 'ruoxin.xu@mongodb.com', 'username': 'RuoxinXu'}

Message: SERVER-47584 Additional testing for hidden indexes
Branch: master
https://github.com/mongodb/mongo/commit/e8fea93bf76fd89dc25cd664888b4959b472b2f9

Comment by Ruoxin Xu [ 21/Apr/20 ]

On collMod() on indexes, the IndexCatalog will be notified and refresh the index entry which resets the 'accesses' field, an indicator indicating the number of operations that have used this index. So the current behaviour does not quite match testing point "4. Leave index usage statistics intact when an index is hidden. They will remain static due to non-use while hidden. Once unhidden they will continue from where they left off on use.", but 'spec' related fields of the hidden index stay intact and static while hidden.

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