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

Use AutoGetCollection::ViewMode::kViewsPermitted when acquiring locks in DocumentSourceCursor::loadBatch()

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Linked BF Score:
      15

      Description

      After a yield, the underlying namespace may have been dropped and replaced with a view. The lock acquisition in DocumentSourceCursor::loadBatch() will then throw because AutoGetCollectionForRead defaults to prohibiting views. The throwing behavior is correct, but the message is confusing.

      Instead, we could acquire locks with view mode AutoGetCollection::ViewMode::kViewsPermitted. This would allow lock acquisition in DocumentSourceCursor::loadBatch() to succeed, and then fail with a much better error message when attempting to use the PlanExecutor, which will be marked as dead because its underlying namespace was dropped.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-query Backlog - Query Team
              Reporter:
              kyle.suarez Kyle Suarez
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated: