Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-73930

Make repl::StorageInterface do less query work

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Storage Execution

      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.

            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            louis.williams@mongodb.com Louis Williams
            0 Vote for this issue
            6 Start watching this issue