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

Change tryMakeShape's return type to StatusWith

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Integration
    • Fully Compatible
    • ALL
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Currently tryMakeShape returns a nullptr if it fails to create a unique_ptr of the shape requested. The idea behind this is that the query shape should fail gracefully instead of failing the entire query. So the function just logs the error and moves on by returning nullptr. 

      This is an issue because query stats requires a query shape and silently passing this error doesn't suffice (i.e. we expect the query to fail). To fix this, we should return a StatusWith type from tryMakeShape instead and check this status from the caller.

            Assignee:
            josh.siegel@mongodb.com Josh Siegel
            Reporter:
            josh.siegel@mongodb.com Josh Siegel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: