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

Support AutoGetCollectionForRead-like readSource validation after query yielding

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution

      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.

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            lingzhi.deng@mongodb.com Lingzhi Deng
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: