Adding showDiskLoc unnecessarily fetches document

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: 3.0.4
    • Component/s: Querying
    • Query Execution
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      While investigating an index corruption case, I enountered the following:

      The following query failed because the index pointed to a bad location. That is the issue I was investigating, not the problem I'm reporting on this ticket.

      db.c.find(q).next()
      

      This query succeeds because it is covered so avoids attempting to fetch the document at the bad location:

      db.c.find(q, {_id:1}).hint({_id:1}).next()
      

      Now attempt to determine the bad location by using showDiskLoc(); it unexpectedly fails attempting to fetch the document (verified by the stack trace), even though it should also be covered:

      db.c.find(q, {_id:1}).hint({_id:1}).showDiskLoc().next()
      

            Assignee:
            [DO NOT USE] Backlog - Query Execution
            Reporter:
            Bruce Lucas (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: