[SERVER-61074] Investigate refactoring compound-indexing code to handle each index type in one place Created: 28/Oct/21  Updated: 30/Mar/23

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

Type: Task Priority: Major - P3
Reporter: Dan Larkin-York Assignee: Backlog - Storage Execution Team
Resolution: Unresolved Votes: 1
Labels: indexing, techdebt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-75505 Difference in dotted path handling be... Closed
related to SERVER-23533 Multikey 2dsphere indexes can support... Backlog
Assigned Teams:
Storage Execution
Participants:

 Description   

Currently, we instantiate one IndexAccessMethod-based class for each index. In the case of a compound index, that class must handle all types in the compound index. This means for each special index type, the code must also handle regular (ascending/descending) indexes. At a minimum, we might be able to refactor so that each implementation for handling regular indexes calls into the same helper methods.

But it might prove more robust in the long-term if we refactor a bit higher up the stack. If, instead of instantiating a specialized IndexAccessMethod for each index, we were instead to have a generic top-level class which iterates over fields in an index, and calls specialized handlers based on the type of indexed field, we are likely to have less issues due to duplicated, subtly different code.


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