[SERVER-73930] Make repl::StorageInterface do less query work Created: 13/Feb/23  Updated: 14/Feb/23

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

Type: Improvement Priority: Major - P3
Reporter: Louis Williams Assignee: Backlog - Storage Execution Team
Resolution: Unresolved Votes: 0
Labels: techdebt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-71018 Break dependency between lib transact... Closed
Assigned Teams:
Storage Execution
Participants:

 Description   

The repl::StorageInterface is turning into its own query planner and duplicates a lot of the same functionality in DBHelpers.

See _findOrDeleteDocuments for an example. It does everything from index selection, bounds selection, all the way to handling write conflict retries. This is quite risky because some query planning work has to be duplicated in StorageInterface (e.g. clustered indexes), and it's mostly used by secondaries. Performance problems and behavioral differences are not necessarily obvious if the implementations differ.

The larger problem is that the alternative, DBHelpers, creates dependency cycle problems for other parts of the server(SERVER-71018). Because its easier to use, StorageInterface is being used instead. For example, this Wildcard indexes test.

My proposal is that we virtualize DBHelpers to avoid dependency issues, and then use DBHelpers everywhere where StorageInterface is being used for the same functionality so that we can delete much of the code in repl::StorageInterface, except where strictly necessary.


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