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

Adding showDiskLoc unnecessarily fetches document

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • 3.0.4
    • Querying
    • Query Execution

    Description

      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()
      

      Attachments

        Activity

          People

            backlog-query-execution Backlog - Query Execution
            bruce.lucas@mongodb.com Bruce Lucas (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated: