Clean up IndexEntry constructor to avoid taking redundant arguments

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      As of this commit, the IndexEntry constructor looks like this:

          IndexEntry(const BSONObj& kp,
                     IndexType type,
                     IndexDescriptor::IndexVersion version,
                     bool mk,
                     MultikeyPaths mkp,
                     std::set<FieldRef> multikeyPathSet,
                     bool sp,
                     bool unq,
                     Identifier ident,
                     const MatchExpression* fe,
                     const BSONObj& io,
                     const CollatorInterface* ci,
                     const WildcardProjection* wildcardProjection,
                     std::shared_ptr<const IndexCatalogEntry> iceStorage = nullptr,
                     size_t wildcardPos = 0)
      

      However the MatchExpression* and CollatorInterface* are both members on the `iceStorage` parameter, so we shouldn't require the caller to pull them out anymore. A further improvement would be to avoid storing the raw pointers altogether in the CoreIndexInfo struct and instead peak into the iceStorage when needed.

            Assignee:
            Nicholas Zolnierz
            Reporter:
            Nicholas Zolnierz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: