[SERVER-57739] Consider changing DocumentSourceSequentialCache to own its own cache. Created: 16/Jun/21  Updated: 06/Dec/22

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

Type: Improvement Priority: Major - P3
Reporter: Ted Tuckman Assignee: Backlog - Query Optimization
Resolution: Unresolved Votes: 0
Labels: qopt-team, tech-debt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Optimization
Participants:

 Description   

Right now DocumentSourceSequentialCache (DSSC) is created by DocumentSourceLookup and the lookup stage maintains ownership of the cache across iterations of doGetNext. When the pipeline is cloned, we wind up with multiple DSSC stages pointing to the same cache. For lookup this is fine as only one copy is ever used, but it means that for DSSC clone() is potentially risky if we want to use it in a situation where we'd want multiple stages with unique caches (stages across multiple pipelines). There may not actually be any work for this ticket if we decide to leave as is – this situation isn't likely to come up.

Lookup currently owns the cache because it needs the cache to outlive multiple calls to buildPipeline. The purpose of this ticket is to figure out if there is a way that we could maintain that property while making clone() make more sense.


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