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

$hint is not validated when collection does not exist

    • Type: Icon: Bug Bug
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Integration
    • ALL
    • 30

      Recently, BF-31428 occurred because a query with an invalid $hint was executed. $hint is supposed to be a string or an object, but in this case it was a double.

      This caused the above issue with query stats since it reasonably does not expect that syntactically invalid statements will be executed. I think the fix there is to make query stats more robust to this, but the behavior of $hint remains confusing.

      This is easy to reproduce from the Mongo shell:

      db.nonexistant.find().hint({$hint: -1})

      This command succeeds even though $hint has the wrong type.

            Assignee:
            christopher.harris@mongodb.com Chris Harris
            Reporter:
            chris.wolff@mongodb.com Chris Wolff
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: