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

Investigate use of persistent maps in CollectionCatalog

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Storage Execution
    • Fully Compatible

      We create a copy of the CollectionCatalog when we need to modify it. This can be somewhat expensive when we have many collections. In some cases where we have a global exclusive lock, such as at startup, we can mitigate this by using batched writes. During steady state though, we can't use this batch processing. For some workloads, like creating many collections in sequence, this can have quadratic cost.

      We could potentially reduce the cost of the CollectionCatalog copy so that it isn't linear in the number of collections by using persistent data structures. We already have a persistent map-like structure in our codebase--the radix tree used for EphemeralForTest. This could be used to, at the very least, do a quick POC and see if the idea warrants further work.

            backlog-server-execution Backlog - Storage Execution Team
            dan.larkin-york@mongodb.com Dan Larkin-York
            0 Vote for this issue
            4 Start watching this issue