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

CardinalityEstimator segfault when invoked over clustered collections

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • Fully Compatible
    • ALL
    • QO 2025-02-03

       

      > db.adminCommand({setParameter:1, planRankerMode: "heuristicCE"})
      > db.createCollection("clustered", {clusteredIndex: {key: {_id: 1}, unique: true}})
      > db.clustered.insert({a: 1})
      > db.clustered.find({_id: 1}, {_id: 1, 'foo.bar': 0})
      
      MongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017
      Segault :(

      The codepath for clustered collections failed to populate the collStats, resulting in a nullptr dereference in the CardinalityEstimator constructor.

      I filed this distinctly from SERVER-97373 because this is a crash in the constructor of CardinalityEstimator, whereas SERVER-97373 may fallback after this constructor.

       

            Assignee:
            ben.shteinfeld@mongodb.com Ben Shteinfeld
            Reporter:
            ben.shteinfeld@mongodb.com Ben Shteinfeld
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: