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

Reason for query failure due to --notablescan should be included in log messages

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 4.3.1
    • Affects Version/s: 2.6.0
    • Component/s: Logging, Querying
    • Labels:
    • Fully Compatible
    • Query 2019-11-04, Query 2019-11-18

      When a query fails due to running mongod with --notablescan, the log message should indicate that the query failure was due to running with --notablescan.

      Setup:

      db.a.save({attr:1})
      

      1) A normal find against a missing index will report which attribute is being queried, but not that it is failing due to --notablescan:

      Prior to 2.6, this was logged:

      > db.a.find({attr:1})
      error: { "$err" : "table scans not allowed:tmp.a", "code" : 10111 }
      

      After 2.6:

      > db.a.find({attr:1})
      Error: error: {
      	"$err" : "Unable to execute query: error processing query: ns=notablescan.a limit=0 skip=0\nTree: attr == 1.0\nSort: {}\nProj: {}\n No query solutions",
      	"code" : 17007
      }
      

      This impacts all clients of the query system: distinct, m/r, agg, count, etc.

            Assignee:
            david.percy@mongodb.com David Percy
            Reporter:
            dan@mongodb.com Daniel Pasette (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: