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

Store MinMax data in flat data structure with user-defined field order

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • Execution Team 2021-05-03, Execution Team 2021-05-17

      Currently the BucketCatalog uses a tree of StringMaps to store the min and max values for all fields stored in the bucket. This handles that objects inserted into the bucket may have an arbitrary field order set by the user.

      We should be able to optimize for a fixed field order where we can traverse the MinMax tree in lock-step with traversing the object that is to be inserted. If the MinMax tree is stored in a flat data structure it should be very cache friendly for iteration at the cost of making insertions more expensive. Iterating over the object and to determine if min or max need to be updated or updating fields already existing is a way more common operation than encountering a field not previously seen in the bucket.

      However, we still need to support objects with arbitrary field orders.

            Assignee:
            henrik.edin@mongodb.com Henrik Edin
            Reporter:
            henrik.edin@mongodb.com Henrik Edin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: