[SERVER-47084] Support AutoGetCollectionForRead-like readSource validation after query yielding Created: 24/Mar/20  Updated: 06/Dec/22  Resolved: 17/Aug/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Lingzhi Deng Assignee: Backlog - Storage Execution Team
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-44529 Re-acquiring locks after a yield and ... Closed
related to SERVER-46721 Step up may cause reads at PIT with h... Closed
Assigned Teams:
Storage Execution
Participants:

 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.


Generated at Thu Feb 08 05:13:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.