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

Replace std::set<std::string> in BucketSpec and BucketUnpacker

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • QE 2023-07-24
    • 0

      Currently we use std::set<std::string> in BucketSpec and BucketUnpacker: https://github.com/mongodb/mongo/blob/8b473650c85276ab5d14526fbb466e961b1111b4/src/mongo/db/exec/timeseries/bucket_spec.h#L259

      https://github.com/mongodb/mongo/blob/8b473650c85276ab5d14526fbb466e961b1111b4/src/mongo/db/exec/timeseries/bucket_unpacker.h#L244

      This forces us to do some unnecessary string copying, for example, here:
      https://github.com/mongodb/mongo/blob/8b473650c85276ab5d14526fbb466e961b1111b4/src/mongo/db/exec/timeseries/bucket_spec.h#L281

      We should replace it with StringSet that supports heterogeneous lookup.
      Important: we need to make sure order of elements is not important before we replace things, because StringSet is unordered: https://github.com/mongodb/mongo/blob/8b473650c85276ab5d14526fbb466e961b1111b4/src/mongo/util/string_map.h#L113

       

       

            Assignee:
            foteini.alvanaki@mongodb.com Foteini Alvanaki
            Reporter:
            ivan.fefer@mongodb.com Ivan Fefer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: