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

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 4.3.1
    • Component/s: Logging, Querying
    • Labels:

      Description

      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.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: