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

Support AutoGetCollectionForRead-like readSource validation after query yielding

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Do
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      We have code to check someĀ preconditions before taking locks and acquiring a snapshot in AutoGetCollectionForRead. But these preconditions are not checked after we yield in PlanExecutor. And in general, the use of AutoGetCollectionForRead seems error-prone after lock yields as the guarantees the RAII type gives might be lost after query yieldings.

      We have SERVER-44529 and SERVER-46721 that describe a similar but slightly different problem of the undesired behaviors of AutoGetCollectionForRead after yields.

      I think it is better to come up with a more generic solution so that the guarantees of AutoGetCollectionForRead can still hold across yields.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-execution Backlog - Storage Execution Team
              Reporter:
              lingzhi.deng Lingzhi Deng
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: